Skip to content

Commit

Permalink
Allow S3 test restore to fail and continue with local-only backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas North committed Apr 16, 2018
1 parent 03b8ea8 commit 90b165d
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions tools/aenigma-backup
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,23 @@ os-br_backup_locally "${skip_install_complete_check-}"
if [ "$backup_archival_location" = "s3" ]
then

mv "$tmp_backup_dir"/* "$backup_local_storage_path/latest"
if [ "${s3_restore_test_failed-null}" = "y" ]
then

############################################################################
echo "${r}${b}Skipping S3 backup because of a previous test restore failure.${x}"
echo

os-br_backup_to_S3
rm -r "$tmp_backup_dir"

else

mv "$tmp_backup_dir"/* "$backup_local_storage_path/latest"

############################################################################

os-br_backup_to_S3

fi

else

Expand All @@ -102,5 +114,10 @@ fi

os-br_purge_dirs

if [ "${s3_restore_test_failed-null}" = "y" ]
then
os-exit_function
fi

echo "${g}${b}Backup complete!${x}"
echo

0 comments on commit 90b165d

Please sign in to comment.