PostgreSQL with BURP

Backup

Puppet code: ::vshn_lib::burp::burp_postgresql

Dump destination directory: /var/lib/postgresql-backup

The postgresql-pre-backup script uses pg_dump to export all PostgreSQL data in a consistent data format before every BURP run, usually once a day. The destination files are named after the database name and are using pg_dump’s “custom” format. The global database is named “postgresql.”

Example file list:

postgres-web.dump
postgres-mail.dump
postgres-postgres.dump

Restore

Backups can be re-imported using pg_restore. This part isn’t automated. No example command is given as the actual restore procedure depends on the situation at hand (partial restore after accidential data removal or a full restore after catastrophic hardware destruction)