From 2123a17733823d6d98ec3ba3934863abcb79e369 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 5 Nov 2015 11:54:17 +0000 Subject: [PATCH] Forget after backup avoids errors --- src/freedombone | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/freedombone b/src/freedombone index 49b88c2f..2336b2c5 100755 --- a/src/freedombone +++ b/src/freedombone @@ -2469,13 +2469,10 @@ function backup_directory_to_usb { echo -n "}' | awk -F '/' '{print " >> /usr/bin/$BACKUP_SCRIPT_NAME echo -n '$2' >> /usr/bin/$BACKUP_SCRIPT_NAME echo "}')" >> /usr/bin/$BACKUP_SCRIPT_NAME - echo ' if [ -d $USB_MOUNT/backup/${2} ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME - echo ' obnam force-lock -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME - echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_SCRIPT_NAME - echo '-r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME - echo ' fi' >> /usr/bin/$BACKUP_SCRIPT_NAME echo ' obnam force-lock -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME echo ' obnam backup -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_SCRIPT_NAME + echo '-r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID' >> /usr/bin/$BACKUP_SCRIPT_NAME else # For rsyncrypto usage see http://archive09.linux.com/feature/125322 echo " BACKUP_CERTIFICATE=$BACKUP_CERTIFICATE" >> /usr/bin/$BACKUP_SCRIPT_NAME @@ -3981,13 +3978,10 @@ function backup_directory_to_friend { echo -n '$2' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME echo "}')" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME - echo ' if [ -d $SERVER_DIRECTORY/backup/${2} ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME - echo ' obnam force-lock -r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME - echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME - echo '-r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME - echo ' fi' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME echo ' obnam force-lock -r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME echo ' obnam backup -r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME + echo '-r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME else # For rsyncrypto usage see http://archive09.linux.com/feature/125322 echo -n ' rsyncrypto -v -r ${1} ' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME