Report this

What is the reason for this report?

How to use S3 based Docker Postgres Backup with Digital Ocean Spaces?

Posted on March 15, 2021

Hey guys,

I am trying to use DO spaces with this Docker Image to back up my Postgres databases. Unfortunately, I always get the error

Invalid endpoint: https://s3..amazonaws.com

I generated the necessary keys and added them where needed. For the S3_PATH I have used:

S3_PATH=https://fra1.digitaloceanspaces.com/my-backups

Also tried to do it without the folder /my-backups but I didn’t work either.

Can anyone help me to set this up?

Image: https://hub.docker.com/r/lucaspiller/backup-postgres-s3



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

I believe that this might not work out of the box without some modifications.

I think that you need to change the upload command on line 66 here:

https://github.com/schickling/dockerfiles/blob/master/postgres-backup-s3/backup.sh

And adjust it accordingly so that it does not use the aws cli but s3cmd instead for example.

Alternatively, you could open an idea for that project and suggest this additional feature.

Regards, Bobby

Heya,

The error message suggests that the endpoint URL is invalid.

Ensure that you are using the correct endpoint URL for DigitalOcean Spaces. The format should be something like:

https://<your-space-name>.<region>.digitaloceanspaces.com

Make sure you replace <your-space-name> with the actual name of your Space and <region> with the appropriate region code (e.g., fra1 for Frankfurt).

Also, double-check your S3_PATH configuration. It should include the complete endpoint URL, like:

S3_PATH=https://<your-space-name>.<region>.digitaloceanspaces.com/my-backups

or without the folder:

S3_PATH=https://<your-space-name>.<region>.digitaloceanspaces.com

If the issue persists, consider checking the documentation or GitHub repository of the Docker image you are using. There might be specific requirements or configurations mentioned that could help resolve the problem.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.