diff options
Diffstat (limited to 'modules/role/manifests/backup')
-rw-r--r-- | modules/role/manifests/backup/postgresql.pp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/role/manifests/backup/postgresql.pp b/modules/role/manifests/backup/postgresql.pp index e635611..e891195 100644 --- a/modules/role/manifests/backup/postgresql.pp +++ b/modules/role/manifests/backup/postgresql.pp | |||
@@ -153,12 +153,19 @@ class role::backup::postgresql inherits role::backup { | |||
153 | description => "Backup the database", | 153 | description => "Backup the database", |
154 | }, | 154 | }, |
155 | { | 155 | { |
156 | command => "/usr/bin/rm -f $(ls -1 $pg_backup_path/*.sql | sort -r | sed -e '1,16d')", | 156 | command => "/usr/bin/rm -f $(ls -1 $pg_backup_path/*.sql | grep -v 'T22:' | sort -r | sed -e '1,12d')", |
157 | user => $pg_user, | 157 | user => $pg_user, |
158 | hour => 3, | 158 | hour => 3, |
159 | minute => 0, | 159 | minute => 0, |
160 | description => "Cleanup the database backups", | 160 | description => "Cleanup the database backups", |
161 | }, | 161 | }, |
162 | { | ||
163 | command => "cd $pg_backup_path ; /usr/bin/rm -f $(ls -1 *T22*.sql | log2rotate --skip 7 --fuzz 7 --delete --format='%Y-%m-%dT%H:%M:%S+02:00.sql')", | ||
164 | user => $pg_user, | ||
165 | hour => 3, | ||
166 | minute => 1, | ||
167 | description => "Cleanup the database backups exponentially", | ||
168 | }, | ||
162 | ] | 169 | ] |
163 | } | 170 | } |
164 | 171 | ||