Percona-Lab / mongodb_consistent_backup

A tool for performing consistent backups of MongoDB Clusters or Replica Sets
https://www.percona.com
Apache License 2.0
276 stars 81 forks source link

Option to Allow skipping bucket validation #287

Closed dschneller closed 5 years ago

dschneller commented 5 years ago

The S3 uploader fails if bucket permissions are restricted to only allow accessing certain prefixes in a bucket. The default behavior for boto's get_bucket() is to "validate" it by accessing the bucket's root, which it might not be allowed to, and thereby needlessly breaking the uploader even though all necessary permissions to actually upload stuff might be present.

This patch adds a new command line switch --upload.s3.skip_bucket_validation to disable this behavior.

timvaillancourt commented 5 years ago

Thanks @dschneller, LGTM. I like that you used kwargs for the new arg, I should have used that instead of the huge arg lists in this tool!