library/roles/postgresql: Some cleanup of the recovery scripts.

This commit is contained in:
Andrea Dell'Amico 2016-06-09 18:47:35 +02:00
parent 98689422b6
commit e2a75c2e8e
2 changed files with 0 additions and 9 deletions

View File

@ -32,14 +32,6 @@ rm $archive_dir/*
# archive WAL files.
touch $archive_dir/backup_in_progress
# Perform a backup of the database.
# ssh -T $RECOVERY_TARGET \
# "pg_basebackup -h $MASTER_HOST -D $archive_dir --xlog"
# Configure the restore_command to use the archive_log WALs well copy
# over in 2nd_stage.sh.
# echo "restore_command = 'cp $archive_dir/%f %p'" | ssh -T $RECOVERY_TARGET "cat > $RECOVERY_DATA/recovery.conf"
psql -c "select pg_start_backup('pgpool-recovery')" postgres
echo "restore_command = 'scp $MASTER_HOST:$archive_dir/%f %p'" > $RECOVERY_DATA/recovery.conf
tar -C $MASTER_DATA_BASE_DIR -zcf pgsql.tar.gz main

View File

@ -1,6 +1,5 @@
#!/bin/bash
# Online recovery 2nd stage script
# Reference: http://michael.stapelberg.de/Artikel/replicated_postgresql_with_pgpool
#
MASTER_DATA_BASE_DIR={{ psql_data_dir }}
MASTER_DATA=$1