Skip to content

Commit

Permalink
add restore_command
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Nov 1, 2024
1 parent 83518f8 commit d72b41e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions automation/roles/patroni/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@
{{ postgresql_bin_dir }}/pg_ctl start -D {{ postgresql_data_dir }} -w -t {{ pg_ctl_timeout | default(3600) }}
-o '--config-file={{ postgresql_conf_dir }}/postgresql.conf'
-o '-c hot_standby=off'
{% if postgresql_version | int >= 12 %}
-o '-c restore_command="pgbackrest --stanza={{ pgbackrest_stanza }} archive-get %f %p"'
{% endif %}
-o '-c archive_command=/bin/true'
-l /tmp/pg_recovery_{{ ansible_date_time.date }}.log
async: "{{ pg_ctl_timeout | default(3600) }}" # run the command asynchronously
Expand Down

0 comments on commit d72b41e

Please sign in to comment.