fix backup/restore workflow

This commit is contained in:
ace 2024-04-26 10:19:02 +03:00
parent cdfc282bf0
commit 82d3456c3b
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
2 changed files with 13 additions and 12 deletions

View File

@ -54,17 +54,18 @@ patroni_wal_g_pg_binary_name: 'wal-g-pg'
patroni_wal_g_config_name: ".walg.json"
patroni_wal_g_restore_config_name: ".walg-restore.json"
patroni_restore_script: "{{ patroni_postgresql_home_dir }}/restore.sh"
#patroni_postgresql_archive_command: "wal-g wal-push %p"
#patroni_postgresql_restore_command: "wal-g wal-fetch %f %p"
#patroni_cluster_bootstrap_command: "wal-g backup-fetch {{ patroni_wal_g_restore_backup_name }}"
## "restore_command" written to recovery.conf when configuring follower (create replica)
#patroni_cluster_restore_command: "wal-g wal-fetch %f %p"
#patroni_wal_g_create_replica_methods:
# - {option: "command", value: "{{ patroni_cluster_bootstrap_command }}"}
# - {option: "no_params", value: "True"}
#patroni_basebackup_create_replica_methods:
# - {option: "max-rate", value: "1000M"}
# - {option: "checkpoint", value: "fast"}
patroni_postgresql_archive_command: "wal-g wal-push %p"
patroni_postgresql_restore_command: "wal-g wal-fetch %f %p"
patroni_cluster_bootstrap_command: "wal-g backup-fetch LATEST"
patroni_cluster_restore_bootstrap_command: "wal-g backup-fetch {{ patroni_wal_g_restore_backup_name }}"
# "restore_command" written to recovery.conf when configuring follower (create replica)
patroni_cluster_restore_command: "wal-g wal-fetch %f %p"
patroni_wal_g_create_replica_methods:
- {option: "command", value: "{{ patroni_cluster_bootstrap_command }}"}
- {option: "no_params", value: "True"}
patroni_basebackup_create_replica_methods:
- {option: "max-rate", value: "1000M"}
- {option: "checkpoint", value: "fast"}
# More examples
# patroni_postgresql_restore_command: "pgbackrest --stanza={{ pgbackrest_stanza }} archive-get %f %p" # restore WAL-s using pgbackrest

View File

@ -1,2 +1,2 @@
#!/usr/bin/env bash
{{ patroni_cluster_bootstrap_command }}
{{ patroni_cluster_restore_bootstrap_command }}