Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding arguments to POST_BACKUP #19

Open
chalaev opened this issue Apr 25, 2020 · 0 comments
Open

adding arguments to POST_BACKUP #19

chalaev opened this issue Apr 25, 2020 · 0 comments

Comments

@chalaev
Copy link

chalaev commented Apr 25, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants