Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fi

# Upload compressed backup file to S3
start=$(date +%s);
aws s3 cp "/tmp/${DB_NAME}.sql.gz" "s3://${S3_BUCKET}/${DB_NAME}.sql.gz" || STATUS=$?
aws s3 cp "/tmp/${DB_NAME}.sql.gz" "${S3_BUCKET}/${DB_NAME}.sql.gz" || STATUS=$?
if [ $STATUS -ne 0 ]; then
error_message="${MYNAME}: FATAL: Copy backup to ${S3_BUCKET} of ${DB_NAME} returned non-zero status ($STATUS) in $(expr ${end} - ${start}) seconds.";
log "ERROR" "${error_message}";
Expand All @@ -130,7 +130,7 @@ if [ $STATUS -ne 0 ]; then
fi

# Upload checksum file
aws s3 cp "/tmp/${DB_NAME}.sql.sha256.gz" "s3://${S3_BUCKET}/${DB_NAME}.sql.sha256.gz" || STATUS=$?;
aws s3 cp "/tmp/${DB_NAME}.sql.sha256.gz" "${S3_BUCKET}/${DB_NAME}.sql.sha256.gz" || STATUS=$?;
end=$(date +%s);
if [ $STATUS -ne 0 ]; then
error_message="${MYNAME}: FATAL: Copy checksum to ${S3_BUCKET} of ${DB_NAME} returned non-zero status ($STATUS).";
Expand Down
4 changes: 2 additions & 2 deletions application/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ log "INFO" "${MYNAME}: copying database ${DB_NAME} backup and checksum from ${S3
start=$(date +%s)

# Download database backup
aws s3 cp s3://${S3_BUCKET}/${DB_NAME}.sql.gz /tmp/${DB_NAME}.sql.gz || STATUS=$?
aws s3 cp "${S3_BUCKET}/${DB_NAME}.sql.gz" "/tmp/${DB_NAME}.sql.gz" || STATUS=$?
if [ $STATUS -ne 0 ]; then
error_message="${MYNAME}: FATAL: Copy backup of ${DB_NAME} from ${S3_BUCKET} returned non-zero status ($STATUS) in $(expr $(date +%s) - ${start}) seconds."
log "ERROR" "${error_message}"
Expand All @@ -104,7 +104,7 @@ if [ $STATUS -ne 0 ]; then
fi

# Download checksum file
aws s3 cp s3://${S3_BUCKET}/${DB_NAME}.sql.sha256.gz /tmp/${DB_NAME}.sql.sha256.gz || STATUS=$?
aws s3 cp "${S3_BUCKET}/${DB_NAME}.sql.sha256.gz" "/tmp/${DB_NAME}.sql.sha256.gz" || STATUS=$?
end=$(date +%s)
if [ $STATUS -ne 0 ]; then
error_message="${MYNAME}: FATAL: Copy checksum of ${DB_NAME} from ${S3_BUCKET} returned non-zero status ($STATUS) in $(expr ${end} - ${start}) seconds."
Expand Down