rewrite restore logic

This commit is contained in:
ace
2023-07-21 17:14:47 +03:00
parent a20385be58
commit e201c69b36
7 changed files with 51 additions and 26 deletions

View File

@ -13,20 +13,23 @@ postgresql_ssl_keep_nonssl_endpoint: false
postgresql_self_signed_cert: true
postgresql_self_signed_cert_name: "cert"
## Backup and restore options
## WAL-G backup and restore options
postgresql_wal_g_install: false
postgresql_wal_g_restore: false
postgresql_wal_g_restore_from_backup: false
postgresql_wal_g_force_delete_and_restore: false
postgresql_wal_g_config_name: ".walg.json"
postgresql_wal_g_restore_config_name: ".walg-restore.json"
postgresql_wal_g_pitr: 'latest'
postgresql_wal_g_restore_backup_name: 'LATEST'
postgresql_wal_g_binary_name: "wal-g-pg"
postgresql_wal_g_postgresql_pitr: "LATEST"
postgresql_recovery_target_time: ""
postgresql_promote_trigger_file: "{{ postgresql_data_dir }}/promote.trigger"
postgresql_password_encryption_algorithm: "scram-sha-256"
postgresql_default_parameters:
data_directory: '{{ postgresql_data_dir }}'
archive_mode: "{{ postgresql_archive_mode | default('on') }}"
listen_addresses: '*'
max_connections: '1000'
superuser_reserved_connections: '5'
@ -59,8 +62,9 @@ postgresql_default_parameters:
postgresql_backup_parameters:
archive_command: "{{ postgresql_archive_command | default('cd .')}}"
postgresql_restore_parameters:
restore_command: "{{ postgresql_restore_command | default('cd .') }}"
archive_mode: "{{ postgresql_archive_mode | default('on') }}"
postgresql_log_dir: "/var/log/postgresql"