Обсуждение: WAL archiving from a standby backup strategy Postgresql 9.3
Hello
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. Does anyone tried to go this path and eventually share his experience.
Best RegardsI 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. Does anyone tried to go this path and eventually share his experience.
On Wed, Apr 23, 2014 at 10:26 AM, Kal Black <kaloblak@gmail.com> wrote: > 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. Does anyone tried to go this path and eventually share his > experience. 9.3 introduced a cascading replication feature [1] that allows you to stream WAL from standbys to other standbys. Instead of a downstream standby you can use pg_receivexlog [2] to receive a WAL stream from the upstream one and write it to a local storage. Also, starting from 9.2, you can make base backups from standbys [3]. [1] http://www.postgresql.org/docs/9.3/static/warm-standby.html#CASCADING-REPLICATION [2] http://www.postgresql.org/docs/9.3/static/app-pgreceivexlog.html [3] http://www.postgresql.org/docs/9.3/static/app-pgbasebackup.html -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray.ru@gmail.com
On Thu, Apr 24, 2014 at 7:44 AM, Sergey Konoplev <gray.ru@gmail.com> wrote: > On Wed, Apr 23, 2014 at 10:26 AM, Kal Black <kaloblak@gmail.com> wrote: >> 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. Does anyone tried to go this path and eventually share his >> experience. > > 9.3 introduced a cascading replication feature [1] that allows you to > stream WAL from standbys to other standbys. Picky correction: cascading replication has been added in 9.2. -- Michael
On Thu, Apr 24, 2014 at 4:37 AM, Michael Paquier <michael.paquier@gmail.com> wrote: >> 9.3 introduced a cascading replication feature [1] that allows you to >> stream WAL from standbys to other standbys. > Picky correction: cascading replication has been added in 9.2. Oh, right, pardon me. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray.ru@gmail.com