From 9c71e733c8ac7e09211948e2c2c6b4aca5321a59 Mon Sep 17 00:00:00 2001 From: Chriz Date: Sun, 19 Nov 2023 21:31:43 +0100 Subject: [PATCH] Update pbs-zfs-daily.sh Added Garbage Collection and Prune, still manual determine of Prund ID --- pbs-zfs-daily.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pbs-zfs-daily.sh b/pbs-zfs-daily.sh index aa44f97..1a0534b 100644 --- a/pbs-zfs-daily.sh +++ b/pbs-zfs-daily.sh @@ -16,6 +16,7 @@ ZPOOLDST=rpool #This pulling Machines Pool/Tank PBSHOST='192.168.0.171' #IP from your Proxmox Backupserver BACKUPSTORE=backup #Datastorename configured in your Proxmox VE System to be backuped and replicated daily BACKUPEXCLUDE='103,104,109,110' #Machines to be excluded from Proxmox Backup +PRUNEJOB='s-88c45b79-77a4' #proxmox-backup-manager prune-job list SSHPORT='22' #SSH Port, usually default 22 internally SCRIPTPATH=/usr/bin #Location of bashclub-zfs Tool - https://raw.githubusercontent.com/bashclub/bashclub-zfs-push-pull/master/bashclub-zfs @@ -44,8 +45,8 @@ scp /tmp/90000_checkzfs $SOURCEHOST:/var/lib/check_mk_agent/spool if [ "$DOW" == $MAINTDAY ]; then echo "MAINTENANCE" - #ssh root@PBSHOST proxmox-backup-manager garbage-collection start (wrong command) - + ssh root@PBSHOST proxmox-backup-manager garbage-collection start $BACKUPSTORE + ssh root@PBSHOST proxmox-backup-manager prune-job run $PRUNEJOB else echo "Today no Maintenance" @@ -80,4 +81,8 @@ scp /tmp/90000_checkpbs root@SOURCEHOST:/var/lib/check_mk_agent/spool /etc/cron.daily/zfs-auto-snapshot +#doing updates without regeret + +apt dist-upgrade -y + #shutdown now