Backups for PostgreSQL

General information on backup schedules and downloading your backups can be found on the Backups page. This includes information on restoring a PostgreSQL backup into a new Compose deployment and downloading your backup files.

You may also manage your PostgreSQL backups with the Compose API.

Backup Contents

Compose PostgreSQL backups use pg_basebackup on your running database cluster to backup your entire deployment. It makes a binary copy of the cluster files and includes all files in the data directory and tablespaces. Also included in the backups is the WAL archive, which holds about the last 24 hours of write and file change transactions for your databases.

Restore to a Local Database

Since your PostgreSQL backups are available for you to download, you may get a copy of your deployment running locally. To do so, you will need a local installation of PostgreSQL and the downloaded backup of your deployment. For using the backup, we include a README file which also provides instructions for using the backup file locally. Open the README file with any text editor.

The file structure of the backup allows for multiple backups to be stored in the same directory; the top few levels are data --> backup --> datestamp directory. Inside the datestamped directory is the snapshot and the WAL archive. You will want to start up your local PostgreSQL inside the snapshot directory with the command postgres -D conf. You can then connect to the db by running: psql postgres -U focker.


Still Need Help?

If this article didn't solve things, summon a human and get some help!