pgpool2.git / summary / log / commit / refs

commit    71111e043fb9b9d3bc1a3d2df76fb63d83725667
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Oct 21 05:07:30 2015 +0000

    Add comments to clarify what are the requirements for the script.
    
    Also add "-c" option to rsync to allow check sum checking.


doc/basebackup.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/basebackup.sh b/doc/basebackup.sh index 6070a65f2..71fe544ec 100644 --- a/doc/basebackup.sh +++ b/doc/basebackup.sh @@ -1,7 +1,21 @@ #! /bin/sh # Recovery script for streaming replication. -# This script assumes that DB node 0 is primary, and 1 is standby. +# This script assumes followings: # +# 1) Executed on the primary node by pgpool_recovery function. +# 2) Executed as "recovery_user" (usually PostgreSQL super user). +# 3) "postgres" database is available. +# 4) can connect to "postgres" database via UNIX domain socket without +# password. +# 5) Password less access using ssh from the primary node to the +# target node is possible. +# 6) Arguments for the scripts are: +# $1: database cluster path on the primary node +# $2: hostname or IP address to be recovered +# $3: database cluster path on target node +# $4: port number of of the primary database cluster +# 7) psql, rsync, ssh are available in the command search path. + datadir=$1 desthost=$2 destdir=$3 @@ -9,7 +23,7 @@ port=$4 psql -p $port -c "SELECT pg_start_backup('Streaming Replication', true)" postgres -rsync -C -a --delete -e ssh --exclude postgresql.conf --exclude postmaster.pid \ +rsync -C -a -c --delete -e ssh --exclude postgresql.conf --exclude postmaster.pid \ --exclude postmaster.opts --exclude pg_log --exclude pg_xlog \ --exclude recovery.conf $datadir/ $desthost:$destdir/ [parent: 2294e58e019d]