Skip to content

Commit

Permalink
remove unnecessary trap
Browse files Browse the repository at this point in the history
  • Loading branch information
egegunes committed Nov 27, 2024
1 parent f743391 commit 771c490
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions percona-xtradb-cluster-8.0-backup/run_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ backup_s3() {
| (grep -v "error: http request failed: Couldn't resolve host name" || exit 1)
fi

trap '' 15
mc -C /tmp/mc stat ${INSECURE_ARG} "dest/$S3_BUCKET/$S3_BUCKET_PATH.md5"
md5_size=$(mc -C /tmp/mc stat ${INSECURE_ARG} --json "dest/$S3_BUCKET/$S3_BUCKET_PATH.md5" | sed -e 's/.*"size":\([0-9]*\).*/\1/')
md5_size=$(sleep 120 && mc -C /tmp/mc stat ${INSECURE_ARG} --json "dest/$S3_BUCKET/$S3_BUCKET_PATH.md5" | sed -e 's/.*"size":\([0-9]*\).*/\1/')
if [[ $md5_size =~ "Object does not exist" ]] || ((md5_size < 23000)); then
log 'ERROR' 'Backup is empty'
log 'ERROR' 'Backup was finished unsuccessfull'
Expand Down

0 comments on commit 771c490

Please sign in to comment.