By vladch
I don’t need to download current database I need a backup from a day or two ago. Also I certainly don’t need to restore current database from a backup. So, is there a way I could download just the backup?
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!
Hello, vladch
I don’t think there is a way to download a backup from the control panel. What you can do is manually backup the database once a day via script and transfer it on a remote server.
Backups are handled automatically and included to you at no additional fee. Full backups are taken every day and write-ahead-logs are maintained to allow you to restore to any point-in-time during the retention period.
You can 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/
A command similar to the following should allow you to dump all the data from your remote PostgreSQL database to a single dump file:
- pg_dump -h use_your_host -U use_your_username -Fc use_your_dbname > dbdump.pgsql
You can restore a dump file to the default database and user by running a command similar to this:
- pg_restore -d 'use_your_connnectionURI' --jobs 4 use_your_dump_file
We cover both importing and exporting databases more detail in our product documentation for our managed databases (PostgreSQL):
https://www.digitalocean.com/docs/databases/how-to/postgresql/import-databases/
Regards, Alex
This is a question we see time and time again with Managed databases and Droplet backups.
At the moment you can only restore to existing backups if you rely on DigitalOcean backups, If you want a downloadable backup you need to back up the database using mysqldump or PostgreSQL pdumps
With this you’re going to need a server or device that can connect to the managed database, if you’re using the app platform you will need to start a droplet or open connections to your local machine to backup, or make use of a 3rd party serverless backup system.
Simon Founder - SnapShooter Backups
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.