Hello Gabriele,
Thank you so much for explaining this to me. I did do some experiment on our test servers and found that barman will actually copy/restore the unshipped WAL files during "restoring from remote server." I did it twice so I think it is really doing that, or is this my imagination?
My spec is Ubuntu 14.04, Postgresql 9.1 and Barman 1.3.0, and this is what I did:
I modified database on the primary database server, made sure WAL files were generated but not yet shipped to Barman backup server, stopped postgres on primary server, then performed restore from Barman backup server. Barman restore the database plus the unshipped WAL files.
(I did turn on the immediate_checkpoint to true in barman.conf)
I also notice that Barman will also copy postgres.conf, pg_hba.conf and indent.conf to my /var/lib/postgresql/9.1/main. I do not have those conf files under my /var/lib/postgresql/9.1/main before restoring database. Those conf files are under /etc/postgresl/9.1/main. Would it be fine if I delete those suddenly appeared conf files under /var/lib/postgresql/9.1/main?
Thank you again,
Amanda