From 50a2795c3a6c72203262400db5029f5afdf1d49c Mon Sep 17 00:00:00 2001 From: Colin Wilk Date: Fri, 3 Nov 2023 19:45:20 +0100 Subject: Migrate role from cron to systemd Systemd gives us the ability to monitor backup job status using existing monitoring solutions (node exporter) and allows us greater control over the scheduling of the backup jobs. This introduces a breaking change that requires users to manually remove the old repositories from the clients and redeploying them with the role. You will have to remove the Cron job that was created by the Ansible script, everything else will be overwritten with a run from the newer version. - name: Remove backup cron jobs ansible.builtin.cron: name: BORG (Application level backups) state: absent become: true - name: Remove env for backup cron job ansible.builtin.cron: name: BORG_PASSPHRASE env: true state: absent become: true Performing manual migrations on the Borg server is not required. We now additionally support multiple Borg repositories per client host using the `borg_backup_argument` variable. Signed-off-by: Colin Wilk --- meta/argument_specs.yml | 53 +++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 24 deletions(-) (limited to 'meta') diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index b243fe0..5b55ac9 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -67,27 +67,32 @@ argument_specs: type: str required: false - borg_cron_time: - type: dict - required: false - options: - minute: - type: str - required: false - default: 0 - hour: - type: str - required: false - default: 3 - weekday: - type: str - required: false - day: - type: str - required: false - month: - type: str - required: false - special_time: - type: str - required: false + borg_backup_script_location: + type: str + required: false + default: /usr/local/bin/run_borg_backup + + borg_backup_timer_name: + type: str + required: false + default: borg_backup + + borg_backup_service_name: + type: str + required: false + default: borg_backup + + borg_backup_argument: + type: str + required: false + default: '{ borg_server_host_url }' + + borg_systemd_oncalendar: + type: str + required: false + default: '*-*-* 02:00:00' + + borg_systemd_accuracysec: + type: str + required: false + default: 60min -- cgit v1.2.3