I'm trying to get Duplicity to work with OVHcloud's S3 offering.
I've set up an S3 container, and it works when I use "s3cmd":
me@pc ~]$ s3cmd ls
2023-05-07 16:02 s3://backupcontainer-pc
However, when using [duplicity (version 1.2.2), I run into an error:
File "/usr/lib/python3.11/site-packages/botocore/client.py", line 960, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (400) when calling the HeadBucket operation: Bad Request
This is the command I use (altough I add many more --include/--exclude parameters):
duplicity --verbosity Debug --no-print-statistics --include /usr/local --include /root --exclude ** --asynchronous-upload --s3-region-name WAW --s3-endpoint-url https://s3.waw.io.cloud.ovh.net / s3://backupcontainer-pc
When running the command, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set using the same values which work with s3cmd.
Any ideas?
Storage and Backup - Duplicity S3: Error when calling the HeadBucket operation
Related questions
- Error while Using Restic to Backup - TooManyRequests
12023
10.05.2022 08:27
- CloudFlare and Public Storage configuration
5952
21.06.2018 10:03
- HA-NAS and Active Directory
5321
30.12.2024 19:44
- Cloud Archive + Rsync
5071
30.03.2018 15:17
- Hubic - backups fail from synology nas
4986
13.04.2018 12:54
- Can't connect to hubic
4414
08.02.2018 18:39
- Using aws sdk (java 2.x) to access S3/Swift Object Storage
4188
26.07.2022 09:28
- Hubic on line storage - files download problems
4153
12.02.2018 12:46
- Configuring S3 Object Storage with Plesk
3648
07.01.2025 16:32
In the Duplicity mailing list, a solution was found for this: I should have put the region code in lower case, see the "OVHCloud's S3" thread here:
https://lists.nongnu.org/archive/html/duplicity-talk/2023-05/threads.html
The
HeadBucketerror in Duplicity with OVH S3 usually comes from incorrect S3 configuration rather than a real bucket issue.With OVHcloud Object Storage, you must use the correct S3 endpoint + region, otherwise the
HeadBucketrequest fails with errors like Bad Request or similar. This happens because OVH’s S3 is compatible, but not identical to AWS defaults.Common causes & fixes:
https://s3.<region>.io.cloud.ovh.netGRA,WAW, etc.)Working approach:
Configure Duplicity with both:
--s3-endpoint-url(OVH endpoint)--s3-region-name