EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.07k stars 191 forks source link

Passive barman server does not include changes since last WAL switch (no streaming data) #283

Open loop-evgeny opened 4 years ago

loop-evgeny commented 4 years ago

barman 2.10, PostgreSQL 12.2

I've configured an active and a passive barman server, as described under http://docs.pgbarman.org/release/2.10/index.html#geographical-redundancy

When I restore from the passive barman instance I find that only changes up to the last WAL archive (WAL switch) are included. The streaming directory on the active barman server contains a .partial file, which is not in the streaming directory on the passive barman server, so that's probably why.

Why does the passive barman not sync the WAL streaming data? Is this by design or a bug? If by design this should be clearly documented. Would it work if I just manually rsynced the whole barman data directory to another server?

MichaelDBA commented 4 years ago

Why no response to this 4month old issue?

gbartolini commented 4 years ago

Why does the passive barman not sync the WAL streaming data? Is this by design or a bug? If by design this should be clearly documented. Would it work if I just manually rsynced the whole barman data directory to another server?

That is by design and we backup only the archive, which contains only the archived WALs (closed).

In general, geographical redundancy is used in long distance scenarios in case of total disruption of a data centre. If you have specific RPO requirements, for example 5 minute, we suggest you use archive_timeout setting and let WAL files be archived maximum every 5 minutes.

You are right we should probably document it better. Happy to review a documentation patch.

Thanks, Gabriele

loop-evgeny commented 4 years ago

Thanks, but could you clarify why this is by design, i.e. what would you expect to go wrong if the passive barman server also rsynced the WAL streaming data?