I am trying to figure out if wal archiving from a standby is possible and a viable option for a backup strategy on Postgresql 9.3.

The idea is to be able to take regular base backups and wal archives from a standby server in a remote DR site.

Unfortunately, the archive_command functionality is not available while the server is in standby_mode mode so I am wandering if the wal archiving could be done successfully using alternative ways like rsync, lsyncd etc.

Has anyone tried to this path can you share your experience?

  • 1
    For base backups just use pg_basebackup -X stream. No WAL archiving required. You can use the WAL archives from the master its self for your DR, no need to take separate archives from the standby. Commented Apr 24, 2014 at 1:28

1 Answer 1


Postgresql provides a pg_receivexlog utility that can be used instead of archive_command to do wal log archiving.

From the Documentation:

pg_receivexlog is used to stream transaction log from a running PostgreSQL cluster. The transaction log is streamed using the streaming replication protocol, and is written to a local directory of files. This directory can be used as the archive location for doing a restore using point-in-time recovery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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