Sha256: 71f38efc9f085b22440c2d484346ee2a22641b57ac63681219d3709a2fa1e0c4

Contents?: true

Size: 543 Bytes

Versions: 12

Compression:

Stored size: 543 Bytes

Contents

#! /bin/sh
# Recovery script for streaming replication.
# This script assumes that DB node 0 is primary, and 1 is standby.
#
datadir=$1
desthost=$2
destdir=$3

psql -c "SELECT pg_start_backup('Streaming Replication', true)" postgres

rsync -C -a --delete -e ssh --exclude postgresql.conf --exclude postmaster.pid \
--exclude postmaster.opts --exclude pg_log --exclude pg_xlog \
--exclude recovery.conf $datadir/ $desthost:$destdir/

ssh -T $desthost mv $destdir/recovery.done $destdir/recovery.conf

psql -c "SELECT pg_stop_backup()" postgres

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
prestogres-0.4.8 pgpool2/doc/basebackup.sh
prestogres-0.4.7 pgpool2/doc/basebackup.sh
prestogres-0.4.6 pgpool2/doc/basebackup.sh
prestogres-0.4.5 pgpool2/doc/basebackup.sh
prestogres-0.4.4 pgpool2/doc/basebackup.sh
prestogres-0.4.3 pgpool2/doc/basebackup.sh
prestogres-0.4.2 pgpool2/doc/basebackup.sh
prestogres-0.4.1 pgpool2/doc/basebackup.sh
prestogres-0.4.0 pgpool2/doc/basebackup.sh
prestogres-0.3.0 pgpool2/doc/basebackup.sh
prestogres-0.2.0 pgpool2/doc/basebackup.sh
prestogres-0.1.0 pgpool2/doc/basebackup.sh