Commit 0530f77e authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch 'fix_backup_cleanup' into 'master'

Missing s3cmd options when listing existing backups

See merge request gitlab-org/build/CNG!681
parents 3fa4ea09 1fc8401c
Pipeline #5410 failed with stages
in 43 seconds
......@@ -109,7 +109,7 @@ function get_existing_backups(){
# Example: TIMESTAMP_YYYY_MM_DD_VERSION_gitlab_backup.tar
case $BACKUP_BACKEND in
s3)
existing_backups=($(s3cmd ls s3://$BACKUP_BUCKET_NAME --rinclude '^\d{10}_\d{4}_\d{2}_\d{2}_.+_gitlab_backup.tar$' | awk '{print $4}' | LC_ALL=C sort))
existing_backups=($(s3cmd ${S3_CMD_BACKUP_OPTION} ls s3://$BACKUP_BUCKET_NAME --rinclude '^\d{10}_\d{4}_\d{2}_\d{2}_.+_gitlab_backup.tar$' | awk '{print $4}' | LC_ALL=C sort))
;;
gcs)
# Note: gsutil doesn't support regex, so we need to try to match the prefix as best we can with wildcards
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment