Backups

Presents various methods for backing up your data.

Database backup

You can use pg_dump and pg_restore to create and restore backups of your PostgreSQL database. A database backup serves as a snapshot of your DataForge instance, allowing you to recover a near-exact replica of its state at the time of the backup. Please note that metric data and S3 storage are not included in the backup configuration.

Create a database backup

To dump a database called ‘mydb’ into an SQL-script file:

$ pg_dump mydb > db.sql

Restore a database from a backup

To restore the dump into a new database called newdb:

$ createdb -T template0 newdb
$ pg_restore -d newdb db.dump

For more information about PostgreSQL’s pg_dumps and pg_restore refer to the official documentation .

Last modified April 22, 2025: (295f0e455)