Skip to content

Commit 4e6d508

Browse files
committed
fix: move pgbackrest logrotate config to follow repo convention
- Move from pgbackrest_config/ to logrotate_config/ to match the existing pattern for all other logrotate configs in the repo - Deploy via the finalize-ami.yml loop rather than setup-pgbackrest.yml - Add size 50M cap to prevent logs growing unbounded between daily rotations during large backup/restore operations
1 parent f7aa104 commit 4e6d508

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

ansible/files/pgbackrest_config/pgbackrest.logrotate renamed to ansible/files/logrotate_config/logrotate-pgbackrest.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/var/log/pgbackrest/*.log {
22
daily
3+
size 50M
34
rotate 7
45
compress
56
delaycompress

ansible/tasks/finalize-ami.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- { file: 'logrotate-postgres-auth.conf' }
6262
- { file: 'logrotate-postgres-csv.conf' }
6363
- { file: 'logrotate-walg.conf' }
64+
- { file: 'logrotate-pgbackrest.conf' }
6465
loop_control:
6566
loop_var: 'logrotate_item'
6667

ansible/tasks/setup-pgbackrest.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@
110110
when:
111111
- stage2_nix
112112

113-
- name: pgBackRest - logrotate config
114-
ansible.legacy.copy:
115-
dest: /etc/logrotate.d/pgbackrest
116-
group: root
117-
mode: '0644'
118-
owner: root
119-
src: files/pgbackrest_config/pgbackrest.logrotate
120-
121113
- name: Create pgBackRest wrapper script
122114
ansible.builtin.copy:
123115
content: |

0 commit comments

Comments
 (0)