]> git.proxmox.com Git - proxmox-backup.git/commitdiff
d/postinst: transform prune tasks from datastore cfg to new prune job
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 30 May 2022 11:36:59 +0000 (13:36 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 30 May 2022 11:58:45 +0000 (13:58 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/postinst

index 1da1b3e4cd953b4a0ef0912707841489812d99c9..3a53e686baed2abd74a84bf924be2ccb0b5074ee 100644 (file)
@@ -41,6 +41,13 @@ case "$1" in
                        flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::\([^@]\+\): /:termproxy::\1@pam: /' /var/log/proxmox-backup/tasks/active || true
                fi
 
+               if dpkg --compare-versions "$2" 'lt' '2.2.2~'; then
+                       echo "moving prune schedule from datacenter config to new prune job config"
+                       proxmox-backup-manager update-to-prune-jobs-config \
+                           || echo "Failed to move prune jobs, please check manually"
+                       true
+               fi
+
                if dpkg --compare-versions "$2" 'lt' '2.1.3~' && test -e /etc/proxmox-backup/sync.cfg; then
                        prev_job=""