Backup with use-agent
This commit is contained in:
parent
6e5ffcc9ea
commit
e0832a2d4f
|
@ -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}/*
|
||||
|
|
Loading…
Reference in New Issue