How-to guides · Checked 5 Oct 2026
How to back up and delete a DigitalOcean database
Your site is dormant, but this database still costs at least $15 a month. DigitalOcean deletes its own automatic backups together with the database — so make your own copy first, then delete it and stop paying.
Check nothing still uses this database (the site is marked dormant). If you’re unsure, ask whoever built the site.
Make your own backup. In DigitalOcean open the database → Overview → Connection Details for the host, user (doadmin), password and port 25060. Then run
pg_dump -h <host> -U doadmin -p 25060 -Fc <database> > backup.pgsql. Not comfortable with commands? Send this page to a developer — it’s about a 10-minute job.Check the backup opens with
pg_restore --list backup.pgsql, then store the file somewhere safe outside DigitalOcean, such as your cloud drive.In DigitalOcean go to Databases, open the cluster’s More menu → Destroy, type the cluster name and click Destroy.
If you track it in SlopDox, delete the database so its charge leaves your ledger.
Good to know
- Deleting is permanent: the database, its contents and DigitalOcean’s automatic backups are all destroyed.
- DigitalOcean bills databases by the hour, so charges stop as soon as the cluster is destroyed.
- Your backup file can be restored into any Postgres database later if the site comes back.
See it done
- Watch how on YouTube ↗ — current videos for this task
- DigitalOcean: export a database with pg_dump ↗
- DigitalOcean: destroy a database cluster ↗