mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2025-06-28 18:03:08 +00:00
fix restore
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
state: directory
|
||||
become_user: postgres
|
||||
|
||||
- name: Check if d folder is empty before proceeding
|
||||
- name: Check if database folder is empty before proceeding
|
||||
find:
|
||||
paths: "{{ postgresql_data_dir }}"
|
||||
register: postgresql_files_found
|
||||
@ -29,13 +29,13 @@
|
||||
- postgresql_files_found.matched == 0
|
||||
block:
|
||||
- name: Restore database dir from backup
|
||||
shell: "{{ postgresql_wal_g_binary_name ~ ' --config ' ~ postgresql_home_dir ~ '/' ~ postgresql_wal_g_restore_config_name ~ ' backup-fetch ' ~ postgresql_data_dir ~ ' ' ~ postgresql_wal_g_restore_backup_name }}"
|
||||
shell: "{{ postgresql_restore_dbs_from_backup_command }}"
|
||||
become_user: postgres
|
||||
|
||||
- name: Include PostgreSQL configuration
|
||||
vars:
|
||||
postgresql_archive_command: "cd ."
|
||||
postgresql_restore_command: "{{ postgresql_wal_g_binary_name ~ ' --config ' ~ postgresql_home_dir ~ '/' ~ postgresql_wal_g_restore_config_name ~ ' wal-fetch %f %p' }}"
|
||||
postgresql_restore_command: "{{ postgresql_restore_wals_from_backup_command }}"
|
||||
include_tasks: config.yaml
|
||||
|
||||
- name: Create recovery.signal file
|
||||
|
Reference in New Issue
Block a user