Hello, after having run barman server for 4 days I decided to check if the backup works by setting up a staging server and restoring the backup to it, here's the command I ran from barman:
barman recover --remote-ssh-command "ssh post...@192.168.1.207" --get-wal --jobs 2 postgresqlserver 20210414T130010 /var/lib/postgresql/13/main
After it finished this is the command found in postgresql.auto.conf in the staging server:
restore_command = 'barman-wal-restore -P -U barman 192.168.1.199 postgresqlserver %f %p'
I fired up postgresql on the staging server and the log showed everything normal until the end:
cat /var/log/postgresql/postgresql-13-main.log
2021-04-18 13:15:24.321 CDT [8554] LOG: restored log file "000000010000001B000000CD" from archive
2021-04-18 13:15:25.407 CDT [8554] LOG: restored log file "000000010000001B000000CE" from archive
2021-04-18 13:15:25.435 CDT [8554] LOG: invalid record length at 1B/CE548BA0: wanted 24, got 0
2021-04-18 13:15:25.435 CDT [8554] LOG: redo done at 1B/CE548B78
2021-04-18 13:15:25.435 CDT [8554] LOG: last completed transaction was at log time 2021-04-18 13:15:24.914658-05
2021-04-18 13:15:26.385 CDT [8554] LOG: restored log file "000000010000001B000000CE" from archive
ERROR: WAL file '00000002.history' not found in server 'postgresqlserver' (SSH host: 192.168.1.207)
ERROR: Remote 'barman get-wal' command has failed!
2021-04-18 13:15:27.131 CDT [8554] LOG: selected new timeline ID: 2
2021-04-18 13:15:27.157 CDT [8554] LOG: archive recovery complete
ERROR: WAL file '00000001.history' not found in server '
postgresqlserver ' (SSH host: 192.168.1.207)
ERROR: Remote 'barman get-wal' command has failed!
2021-04-18 13:15:28.548 CDT [8553] LOG: database system is ready to accept connections
The restored database seems to have all the data it should and apart from those errors it seems to be working fine, but this was only a test and I want to know that in case of a real recovery the backup will work.