Check for backup failures
This commit is contained in:
parent
a8e7aeb497
commit
09d6beddb2
|
@ -264,6 +264,18 @@ function set_obnam_client_name {
|
|||
function backup_directory_to_usb_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --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
|
||||
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu ${1}/*
|
||||
rm -rf ${1}
|
||||
fi
|
||||
function_check restart_site
|
||||
restart_site
|
||||
remove_backups_temp_directory
|
||||
exit 8352925
|
||||
fi
|
||||
if [[ $ENABLE_BACKUP_VERIFICATION == "yes" ]]; then
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity verify --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
|
||||
|
@ -424,6 +436,16 @@ function set_user_permissions {
|
|||
function backup_directory_to_friend_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --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}/*
|
||||
rm -rf ${1}
|
||||
fi
|
||||
function_check restart_site
|
||||
restart_site
|
||||
remove_backups_temp_directory
|
||||
exit 5293526
|
||||
fi
|
||||
if [[ $ENABLE_BACKUP_VERIFICATION == "yes" ]]; then
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity verify --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
|
||||
|
|
Loading…
Reference in New Issue