Toolbox - backup-utility script --maximum-backups not working when using --s3tool awscli
Summary
From the toolbox, backup-utility
script has an option to cleanup automatically the previous backups based on the --maximum-backups
parameter.
When using--s3tool awscli
, the script throw the following error:
An HTTP Client raised an unhandled exception: Not supported URL scheme s3
This is likely due to the fact that the following lines in the script are not using the correct variable syntax for WS_S3_SETTINGS_LIST
:
- https://gitlab.com/gitlab-org/build/CNG/blob/master/gitlab-toolbox/scripts/bin/backup-utility#L131
- https://gitlab.com/gitlab-org/build/CNG/blob/master/gitlab-toolbox/scripts/bin/backup-utility#L157
I believe it should be ${AWS_S3_SETTINGS_LIST[@]}
and not ${AWS_S3_SETTINGS_LIST}
Steps to reproduce
backup-utility --cleanup --maximum-backups 2 --s3tool awscli --aws-s3-endpoint-url https://redacted.minio.endpoint
Configuration used
Current behavior
Old Backups are deleted based on the parameter set in --maximum-backups N
Expected behavior
Error, nothing is deleted
Versions
- Chart: 6.6.1
- Platform:
- Self-hosted: OpenShift
Relevant logs
git@gitlab-toolbox-6dd7c74c87-5d2bd:/$ backup-utility --cleanup --maximum-backups 2 --s3tool awscli --aws-s3-endpoint-url https://redacted.minio.endpoint
An HTTP Client raised an unhandled exception: Not supported URL scheme s3
Found 0 existing backups. Maximum allowed is 2
[DONE] Finished pruning old backups
Edited by Antoine Marasi