By l0qii
I don’t see any backup options in the DO admin UI like I do for other droplets.
I’ve tried pg_dumpall but I get this error
FATAL: no pg_hba.conf entry for host “<IP>”, user “<ADMIN>”, database “template1”, SSL off
Also pg_dump/pg_dumpall would have to be run manually, I’m looking for a way to do scheduled regular backups of my database
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!
I looked around and didn’t find this answer at the moment, followed the Postgres how to mostly. With default postgresql-client you might get an error because the client and server have different versions, for me the server had postgresql-server-11.
So install the same version for the client following the official guide https://www.postgresql.org/download/
# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# Update the package lists:
sudo apt-get update
# Install the latest version of PostgreSQL.
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
sudo apt-get install postgresql-client-11
And when done you can backup
pg_dump -d your_db_uri_here > backup_yourDB_todayDate.sql
Hello, @l0qii
Backups are handled automatically and included to you at no additional fee. Full backups are taken everyday and write-ahead-logs are maintained to allow you to restore to any point-in-time during the retention period.
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 PosfreSQL cluster from Backups:
https://www.digitalocean.com/docs/databases/postgresql/how-to/restore-from-backups/
You can also manually backup 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:
dokku postgres:backup dbname bucketname
Hope this helps!
Regards, Alex
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.