0

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?

asked Apr 8, 2020 at 7:30

2 Answers 2

4

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.

answered Apr 8, 2020 at 7:43
0

There's a third-party free tool (albeit from company that contributes to Postgres) named pg_probackup that allows to restore specific databases from the cluster.
As I understand it, the backup operation still works on cluster level. I should check that out

answered Jun 17, 2020 at 13:25
2
  • Any news ? Does this tool allow to restore a single DB without touching other ? Commented Feb 14, 2022 at 8:39
  • @emoxam I haven't got around to testing it, sorry Commented Feb 15, 2022 at 7:04

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.