Can managed databases be backed up outside of Digital Ocean without a third-party?

I spun up a Postgres managed database which auto-created a backup. I noticed that this backup didn’t have any export options only restore.

Is it possible to back this up to another cloud provider?

I saw this provider can accomplish what I am asking but I was just wondering whether this is via some API or they are connecting to the DB over the internet and backup up that way.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Andy Hattemer
DigitalOcean Employee
DigitalOcean Employee badge
September 15, 2020
Accepted Answer

@ashconnor Good question.

Unfortunately, you cannot export managed database backups via the control panel or API. So all automated solutions for backing up your managed database to a different cloud will require a connection to the DB over the internet.

Despite that limitation, I think you could run a scheduled job from a DigitalOcean Droplet that does something like this at a set interval:

  1. pg_dump
  2. (optional) Encrypt the file.
  3. Upload the file to S3

These instructions for exporting a postgresql database apply equally well for our postgres db’s.

Security considerations:

  • Create a VPC and add or migrate the Droplet and Managed Database to it.
  • Use the private network connection params to run the pg_dump from the Droplet, this means all the database export network traffic will stay firewalled within your VPC within our datacenters.
  • Encrypt the output: before leaving the safety of your VPC and uploading to S3, you can encrypt the file.

Cost-savings considerations:

  • pg_dump has a --compress or -Z argument that will gzip the file, (or you could just compress it after pg_dump.) Either way that will probably help you save your bandwidth budget and storage costs wherever you send the file.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel