dsc0_just_rebooted.txt Login to dcs0 and dcs2 as needed as postgres/production. NOTE: to use like jim after su - postgres (newuser1): > csh > source .jimalias NOTE!! For dcs1: Substitute dcs1 for dcs0 below and 5431 for 5430 Stop dcs0 DB on dcs0: pg_ctl -D /var/lib/pgsql/dcs0_data -m fast stop Stop dcs0/dcs1 warm standby on dcs2: pg_ctl -D /var/lib/pgsql/dcs0_data/ stop -m fast Make sure no /tmp/pgsql.trigger.5430 on dcs2 Login to dcs0 as postgres > ls -1 / | grep WALarchive | wc -l 1 NOTE: the original dcs0 will return 1. Orig dcs2 converted to dcs0 returns 0. If (0) then cp configfiles/postgresql.conf.dcs0.0 dcs0_data/postgresql.conf rm -f /data/WALarchive/5430/* if (1) then cp configfiles/postgresql.conf.dcs0.1 dcs0_data/postgresql.conf rm -f /WALarchive/5430/* Restart the dcs0 database to create WAL archives: > pg_ctl -D /var/lib/pgsql/dcs0_data/ start Begin the backup process on dcs0: > psql -p 5430 -c "select pg_start_backup('2010-03-15')" Create a tar archive of the system data directory: > tar -czvf dcs0_backup.tar.gz dcs0_data/ Stop the backup process on dcs0: > psql -p 5430 -c "select pg_stop_backup()" Copy the archive file from dcs0 to dcs2: > scp dcs0_backup.tar.gz postgres@dcs2:/var/lib/pgsql/ Now login to dcs2 as postgres: > rm -rf dcs0_data Uncompress the archive file: > tar -xzvf dcs0_backup.tar.gz > ls -1 / | grep WALarchive | wc -l 0 if(0) then cp configfiles/recovery.conf.dcs0.0 dcs0_data/recovery.conf cp configfiles/postgresql.conf.dcs0.ws dcs0_data/postgresql.conf if(1) then cp configfiles/recovery.conf.dcs0.1 dcs0_data/recovery.conf cp configfiles/postgresql.conf.dcs0.ws dcs0_data/postgresql.conf Remove the postmaster.pid file: > rm dcs0_data/postmaster.pid > chmod 700 /var/lib/pgsql/dcs0_data/ Start the dcs0 warm standby server, execute the command: > pg_ctl -D /var/lib/pgsql/dcs0_data/ start The server should go into recovery mode and stay there. This msg is ok: LOG: could not create IPv6 socket: Address family not supported by protocol ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Now as user production on dcs0: See the file /home/production/cvs/JSOC/doc/whattodo_dcs.txt