Skip to content

adding arguments to POST_BACKUP #19

Description

@chalaev

I suggest providing to POST_BACKUP IDs of newly created and removed old backups.
It would be useful if encrypted backups are stored in a cloud. Here is the patch:

--- original-backup	2020-04-25 10:16:36.000000000 -0400
+++ patched-backup	2020-04-25 10:18:58.000000000 -0400
@@ -762,6 +762,7 @@
     fi
 
     # Remove old differential backups...
+    declare -a removed
     if [[ $BASE_BID -gt 0 ]]; then
         ARCH_LIST=(`ls $VOLNAME.*1.list.gz`)
         LV=0
@@ -776,6 +777,7 @@
                     : $[MATCHCNT+=1]
                     if [[ $MATCHCNT -gt $GENERATIONS ]]; then
                         purge $BID
+			removed+=($BID)
                     fi
                 fi
             done
@@ -824,7 +826,7 @@
     # Run post-backup
     echo
     echo "Running post-backup procedure..."
-    POST_BACKUP
+    POST_BACKUP $NEW_BID ${removed[@]}
 
     echo
     date

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions