Compare commits
6 Commits
tpiccioli-
...
master
Author | SHA1 | Date |
---|---|---|
|
48c2f6c87b | |
|
ca7c23fe39 | |
|
f5bbbf009d | |
|
988e4edb9e | |
|
7651e5cc48 | |
|
62059a65f3 |
|
@ -98,8 +98,9 @@ pgpool_wd_heartbeat_dest0_port: '{{ pgpool_wd_heartbeat_port }}'
|
|||
pgpool_enable_ssl: False
|
||||
pgpool_letsencrypt_managed: True
|
||||
pgpool_ssl_key: /etc/pki/pgpool2/pgpool2.key
|
||||
pgpool_ssl_cert: '/var/lib/acme/live/{{ ansible_fqdn }}/cert'
|
||||
pgpool_ssl_ca: '/var/lib/acme/live/{{ ansible_fqdn }}/fullchain'
|
||||
pgpool_ssl_cert: '/var/lib/acme/live/{{ ansible_fqdn }}/fullchain'
|
||||
# In CentOS/RHEL is /etc/pki/tls/cert.pem
|
||||
pgpool_ssl_ca: '/etc/ssl/certs/ca-certificates.crt'
|
||||
pgpool_ssl_ca_dir: /etc/ssl/certs
|
||||
pgpool_virtual_ip: 127.0.0.1
|
||||
pgpool_virtual_netmask: 24
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
su - postgres -c "/usr/local/sbin/postgresql_wal_backup_and_removal > /var/log/postgresql/wal_removal.log 2>&1"
|
||||
|
|
@ -117,6 +117,11 @@
|
|||
|
||||
- name: Install a script that cleans up the wal log archives
|
||||
template: src=postgresql_wal_backup_and_removal.j2 dest=/usr/local/sbin/postgresql_wal_backup_and_removal owner=root group=root mode=0755
|
||||
tags: [ 'postgres_backuppc', 'postgres', 'postgresql', 'sudo', 'pgpool' ]
|
||||
|
||||
- name: backuppc root script to syncronize backup and wal clean up
|
||||
copy: src=backuppc_pg_wal.sh dest=/usr/local/sbin/backuppc_pg_wal.sh owner=root mode=0744
|
||||
tags: [ 'postgres_backuppc', 'postgres', 'postgresql', 'pgpool' ]
|
||||
|
||||
# The script is started by the backup server after the file copy, crontab action must be deleted
|
||||
#- name: Install a cron job to cleanup the wal log archives
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
ISMASTER=`psql -t -c "SELECT pg_is_in_recovery();"`
|
||||
if [ $ISMASTER != 'f' ]
|
||||
then
|
||||
echo "Not on master, nothing to do."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BASE_BACKUP_DIR={{ psql_base_backup_dir }}
|
||||
WAL_ARCHIVES_LOG_DIR={{ psql_wal_archiving_log_dir }}
|
||||
WAL_LATEST_BACKUP=
|
||||
|
@ -15,3 +22,4 @@ pg_archivecleanup $WAL_ARCHIVES_LOG_DIR $WAL_LATEST_BACKUP
|
|||
|
||||
exit $?
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue