From e0832a2d4f6af631d9de4126fdc46a379cbe0c46 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 17 Feb 2018 14:50:09 +0000 Subject: [PATCH] Backup with use-agent --- src/freedombone-utils-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index e3d2a22b..f38444a7 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -282,7 +282,7 @@ function backup_database_local_usb { function backup_directory_to_usb_duplicity { create_backups_temp_directory - echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2} + echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --use-agent --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2} if [ ! "$?" = "0" ]; then umount $USB_MOUNT rm -rf $USB_MOUNT @@ -412,7 +412,7 @@ function set_user_permissions { function backup_directory_to_friend_duplicity { create_backups_temp_directory - echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --ssh-askpass --encrypt-key ${ADMIN_BACKUP_KEY_ID} --full-if-older-than 4W --exclude-other-filesystems ${1} $SERVER_DIRECTORY/backup/${2} + echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --use-agent --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --ssh-askpass --encrypt-key ${ADMIN_BACKUP_KEY_ID} --full-if-older-than 4W --exclude-other-filesystems ${1} $SERVER_DIRECTORY/backup/${2} if [ ! "$?" = "0" ]; then if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then shred -zu ${1}/*