Define shell variable regardless of backend

This commit is contained in:
Johannes Zellner
2016-09-16 16:58:15 +02:00
parent e8be76f2e8
commit 3ac786ba6d
2 changed files with 6 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ readonly app_data_snapshot="${DATA_DIR}/snapshots/${app_id}-${now}"
btrfs subvolume snapshot -r "${app_data_dir}" "${app_data_snapshot}"
# will be checked at the end
try=0
if [[ "$1" == "s3" ]]; then
# Upload config.json first because uploading tarball might take a lot of time, leading to token expiry
for try in `seq 1 5`; do

View File

@@ -55,6 +55,9 @@ mysqldump -u root -ppassword --single-transaction --routines --triggers box > "$
echo "Snapshoting backup as backup-${now}"
btrfs subvolume snapshot -r "${BOX_DATA_DIR}" "${box_snapshot_dir}"
# will be checked at the end
try=0
if [[ "$1" == "s3" ]]; then
for try in `seq 1 5`; do
echo "Uploading backup to ${s3_url} (try ${try})"