mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-16 13:56:03 +08:00
Improve the IPA backup process
Fixes: https://pagure.io/fedora-infrastructure/issue/9916 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
# Run data only backups daily
|
||||
0 20 * * * root /usr/sbin/ipa-backup --data --online --quiet
|
||||
8
roles/ipa/server/files/data-only-backup.sh
Executable file
8
roles/ipa/server/files/data-only-backup.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Run data only backups daily and only keep a certain number of old backups.
|
||||
|
||||
KEEP=14
|
||||
|
||||
ls -1d /var/lib/ipa/backup/ipa-data-* | head -n -${KEEP} | xargs rm -rf
|
||||
/usr/sbin/ipa-backup --data --online --quiet
|
||||
@@ -642,8 +642,10 @@
|
||||
|
||||
- name: Set cron for daily data only backups
|
||||
copy:
|
||||
src: data-only-backup
|
||||
dest: "/etc/cron.d/data-only-backup"
|
||||
src: data-only-backup.sh
|
||||
dest: "/etc/cron.daily/data-only-backup.sh"
|
||||
mode: 0755
|
||||
|
||||
|
||||
- name: Ensure python dep is present
|
||||
pip:
|
||||
|
||||
Reference in New Issue
Block a user