Question

Export database backups in App Platform

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


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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!