diff options
author | Paul B <paul+gh@bonaud.fr> | 2019-05-03 14:27:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 14:27:18 +0200 |
commit | b9038ad7484a472f1e745906fb0d26530061b58d (patch) | |
tree | 4416f99a827f63e37ab98d94c66126d33ab323b0 /templates | |
parent | c6719a82860c7855fb749f98734fe17c38c2fe78 (diff) | |
parent | 99504fed92577795e1ab0bf2ec0cd30a2435799f (diff) | |
download | ansible-postgresql-role-b9038ad7484a472f1e745906fb0d26530061b58d.tar.gz ansible-postgresql-role-b9038ad7484a472f1e745906fb0d26530061b58d.tar.zst ansible-postgresql-role-b9038ad7484a472f1e745906fb0d26530061b58d.zip |
Merge pull request #8 from chtitux/barman-url1.5.0
Allow to set options for barman connectivity
Diffstat (limited to 'templates')
-rw-r--r-- | templates/postgresql.10.conf.j2 | 2 | ||||
-rwxr-xr-x | templates/standby-clone.sh.j2 | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/templates/postgresql.10.conf.j2 b/templates/postgresql.10.conf.j2 index 588020f..b07b22b 100644 --- a/templates/postgresql.10.conf.j2 +++ b/templates/postgresql.10.conf.j2 | |||
@@ -228,7 +228,7 @@ wal_log_hints = on # also do full page writes of non-critical updates | |||
228 | 228 | ||
229 | {% if postgres_archive_enabled %} | 229 | {% if postgres_archive_enabled %} |
230 | archive_mode = on | 230 | archive_mode = on |
231 | archive_command = 'rsync -a %p barman@{{ postgres_barman_server }}:/var/lib/barman/{{ barman_directory }}/incoming/%f' | 231 | archive_command = 'rsync -a %p {{ postgres_barman_remote_user }}@{{ postgres_barman_server }}:/var/lib/barman/{{ barman_directory }}/incoming/%f' |
232 | {% else %} | 232 | {% else %} |
233 | archive_mode = off | 233 | archive_mode = off |
234 | archive_command = '' | 234 | archive_command = '' |
diff --git a/templates/standby-clone.sh.j2 b/templates/standby-clone.sh.j2 index 16a6930..2db44b6 100755 --- a/templates/standby-clone.sh.j2 +++ b/templates/standby-clone.sh.j2 | |||
@@ -29,11 +29,8 @@ sudo -u postgres mkdir -p /var/lib/postgresql/{{ postgres_version }}/{{ postgres | |||
29 | 29 | ||
30 | echo Get previous backup from backups server | 30 | echo Get previous backup from backups server |
31 | sudo -u postgres \ | 31 | sudo -u postgres \ |
32 | time rsync --progress -pvia --exclude='*.conf' --exclude='server.crt' --exclude='server.key' --delete \ | 32 | time rsync --progress -pvia --exclude='*.conf' --exclude='server.crt' --exclude='server.key' --delete {{ rsync_options }} \ |
33 | {% if postgres_barman_rsync_enabled|default(false) -%} | 33 | {{ barman_remote_url }}/$BARMAN_DATABASE/base/$BARMAN_BACKUP_VERSION/data/ \ |
34 | --password-file=/var/lib/postgresql/.rsync_pass \ | ||
35 | {%- endif %} | ||
36 | {% if postgres_barman_rsync_enabled|default(false) -%}rsync://{%- endif -%}barman@{{ postgres_barman_server }}{%- if postgres_barman_rsync_enabled|default(false) -%}/backups{%- else -%}:~{%- endif -%}/$BARMAN_DATABASE/base/$BARMAN_BACKUP_VERSION/data/ \ | ||
37 | /var/lib/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/ | 34 | /var/lib/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/ |
38 | 35 | ||
39 | echo Restoring .conf and server certificate | 36 | echo Restoring .conf and server certificate |