Basically I have one (for now) mission critical postgresql database that I will need up to the minute recovery for, I've never implemented a working WAL archival before so I would like to know what is the best way to do this.

The machine we are going to backup to is remote, and we have ssh keys set up, so I was going to have the WAL's rsync'd over. Is that wise with that archive_command option?

A Step by Step guide with examples on how to set these things up would be amazing as I couldn't find one I understood (I'm not a DBA)


Using pgBarman, This was really easy as it walked me through it all, plus it's open source! I stumbed upon this while googling link to pgBarman tutorial (pdf) link to pgBarman site

  • How did you test that recovery is working? – dezso Sep 10 '12 at 12:55
  • i'm working on that now, setting up separate instance of the VM running the Postgres server, and going to drop all tables then restore via barman. not sure how to check vs what should be there though? – Jharwood Sep 10 '12 at 12:59
  • ok, now i'm taking a standard logical dump to restore from just in case – Jharwood Sep 10 '12 at 13:12
  • Ok, restore works, but there were a few things they didn't mention in the Docs. namely, that the directory you need to set the restore command to is the data area for postgresql (on ubuntu this is /var/lib/postgresql/<main_version>.<minor_version>/main/), also it doesn't seem to do everything for you in regards to getting the server back online, you still have to physically start the server again, but i suppose thats for safety – Jharwood Sep 11 '12 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.