I'm a developer learning Postgresql and I'd like to know more about backups.
As long-time Sql Server user, I understand backup and restore usually is done on a database level.
So far every tool I see for Postresql (except pg_dump) – barman, wal-e, wal-g, pgbackrest, etc. – seems to work cluster-wide. How does that work?
If I have 20 databases inside my cluster and I deployed an application with a bug, how do I restore just that one broken DB? Is that possible?
PostgreSQL – How to Backup and Restore at Database Level
backuppostgresqlrestore
Related Question
- Postgresql streaming replication and wal archive
- SQL Server 2012 – MAXTRANSFERSIZE Setting Causes Restore to Fail
- PostgreSQL Backup – Simplest Filesystem Backup of Postgres Database
- SQL Server Always On – How to Restore a Node from Veeam Backup
- Mysql – Fast Backup and Restore of Growing Databases
- PostgreSQL – Safely Shutting Down Misconfigured Replication/Archiving
Best Answer
Except pg_dump which a logical backup tool, all other tools are physical backup tools and copy all database files from the cluster and transaction logs (WAL). AFAIK currently there is no way to make a physical backup of a single database.
If you need to restore one single database from a physical backup you need to restore the whole cluster-wide backup to a temporary instance and use pg_dump/pg_restore to restore the single database from the temporary cluster into the original cluster.