Another template that pertains to pgpool.
This commit is contained in:
parent
14968c9da3
commit
d872e67c8c
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
BASE_BACKUP_DIR={{ psql_base_backup_dir }}
|
||||
WAL_ARCHIVES_LOG_DIR={{ psql_wal_archiving_log_dir }}
|
||||
WAL_LATEST_BACKUP=
|
||||
|
||||
# The base backup dir needs to be empty
|
||||
|
||||
rm -f $BASE_BACKUP_DIR/*
|
||||
pg_basebackup -F t -z -D $BASE_BACKUP_DIR
|
||||
|
||||
cd $WAL_ARCHIVES_LOG_DIR
|
||||
WAL_LATEST_BACKUP=$( /bin/ls -1tr *.backup | tail -1 )
|
||||
pg_archivecleanup $WAL_ARCHIVES_LOG_DIR $WAL_LATEST_BACKUP
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue