From e2a75c2e8efedd49655aaa84e827307ab3f9d5e7 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 9 Jun 2016 18:47:35 +0200 Subject: [PATCH] library/roles/postgresql: Some cleanup of the recovery scripts. --- postgresql/templates/pgpool_recovery_stage_1.j2 | 8 -------- postgresql/templates/pgpool_recovery_stage_2.j2 | 1 - 2 files changed, 9 deletions(-) diff --git a/postgresql/templates/pgpool_recovery_stage_1.j2 b/postgresql/templates/pgpool_recovery_stage_1.j2 index 72b722d..27e57b2 100644 --- a/postgresql/templates/pgpool_recovery_stage_1.j2 +++ b/postgresql/templates/pgpool_recovery_stage_1.j2 @@ -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 we’ll 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 diff --git a/postgresql/templates/pgpool_recovery_stage_2.j2 b/postgresql/templates/pgpool_recovery_stage_2.j2 index b9da6af..e08dd43 100644 --- a/postgresql/templates/pgpool_recovery_stage_2.j2 +++ b/postgresql/templates/pgpool_recovery_stage_2.j2 @@ -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