Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)

share|improve this question

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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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