Report this

What is the reason for this report?

Export database backups in App Platform

Posted on December 26, 2021

I have two components in my App Platform: a PostgreSQL database and Node. I occasionally want to export a backup of my database so that I can import it locally. How can I do this on AppPlatform? I’ve tried a few things, but there have been restrictions (such as not being able to run sudo or not being able to push to github) that have caused those attempts to not work



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.

Hello @oliverullman,

You won’t be able to connect to the database cluster using the console or cloud panel. You have to make sure that your local IP address is allowed to connect to the database via trusted sources and then you can connect to the cluster by referring to the documentation link below:

https://docs.digitalocean.com/products/databases/postgresql/how-to/connect/

Once you connect to the database cluster then you can export it using pg_dump command as demonstrated in the below docs:

https://docs.digitalocean.com/products/databases/postgresql/how-to/import-databases/#export-an-existing-database

Cheers, Dikshith

Hello there,

You an check our official Docs for the Managed PosfreSQL Database here:

https://www.digitalocean.com/docs/databases/postgresql/how-to/

And check the tutorial on how to restore a PostgreSQL cluster from Backups:

https://www.digitalocean.com/docs/databases/postgresql/how-to/restore-from-backups/

You can also manually back up your databases using the dokku-postgres plugin as well. You can check this article as well:

https://tute.io/automatic-backup-postgresql-dokku-digitalocean-spaces

With this command you can manually backup PostgreSQL Database to DigitalOcean Spaces:

  1. dokku postgres:backup dbname bucketname

Hope this helps!

I’m curious about this too. Haven’t tried it yet.

They are not providing this out-of-the-box because they want to push the managed database solution.

As long as you’re able to run a script (along your application server) that will frequently generate a dump and is able to upload it on a S3 (or equivalent) frequently, it should be good. (The server is backing him himself)

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.