|
|
|
|
282
|
|
282
|
|
283
|
function backup_directory_to_usb_duplicity {
|
283
|
function backup_directory_to_usb_duplicity {
|
284
|
create_backups_temp_directory
|
284
|
create_backups_temp_directory
|
285
|
- 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}
|
|
|
|
|
285
|
+ 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}
|
286
|
if [ ! "$?" = "0" ]; then
|
286
|
if [ ! "$?" = "0" ]; then
|
287
|
umount $USB_MOUNT
|
287
|
umount $USB_MOUNT
|
288
|
rm -rf $USB_MOUNT
|
288
|
rm -rf $USB_MOUNT
|
|
|
|
|
412
|
|
412
|
|
413
|
function backup_directory_to_friend_duplicity {
|
413
|
function backup_directory_to_friend_duplicity {
|
414
|
create_backups_temp_directory
|
414
|
create_backups_temp_directory
|
415
|
- 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}
|
|
|
|
|
415
|
+ 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}
|
416
|
if [ ! "$?" = "0" ]; then
|
416
|
if [ ! "$?" = "0" ]; then
|
417
|
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
417
|
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
418
|
shred -zu ${1}/*
|
418
|
shred -zu ${1}/*
|