barman icon indicating copy to clipboard operation
barman copied to clipboard

Recovery does not include partial wal file unless --get-wal is specified which implies that SSH is enabled

Open allanharry opened this issue 3 years ago • 6 comments

Hi Due to security we dont want that database team can gain acces to backups in BARMAN using SSH. So we are using streaming protocol for wal files and pgbasebackup where ssh is not needed.

For the recover part we observe that transactions in partial wal file not being applied ! barman recover
--remote-ssh-command "sshpass -p xxxxxx ssh postgres@pg1"
pg1
20210124T232937
/pg_database/pg12

Doing the recover with --get-wal and allowing ssh from pg1 to barman server will include partial wal file and RPO=zero: barman recover
--get-wal
--remote-ssh-command "sshpass -p xxxxxx ssh postgres@pg1"
pg1
20210124T232937
/pg_database/pg12

If backup can be done using streaming protocol then this partial wal file should also somehow be handled during the recover to ensure RPO=zero. Are there any plans to include this in BARMAN ?

Regards Allan

allanharry avatar Sep 09 '21 10:09 allanharry

I can confirm that the issue exists. @mikewallace1979 is there any update on this?

nlgtuankiet avatar Jul 21 '22 04:07 nlgtuankiet

@nlgtuankiet Thanks for confirming - I have also reproduced this. We'll get a fix into one of the upcoming releases.

mikewallace1979 avatar Jul 21 '22 08:07 mikewallace1979

Also ran into this, not realizing I will need a ssh connection from postgres to barman to restore partial wal files . Since my database is sitting inside a docker container that doesn't have an ssh client this complicates the setup to restore data significantly for me :(

pct-cclausen avatar Sep 30 '22 18:09 pct-cclausen