From 9952fcf3c6e23d229c4d7678d0acd90e6a83ceba Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 18 Apr 2023 21:58:03 +0200 Subject: [PATCH] Remove cron configuration The Debian package ships a systemd timer --- README.md | 5 ++--- tasks/borg.yml | 9 --------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 13dcc06..aef67c8 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,11 @@ Works great with [BorgBase.com](https://www.borgbase.com) - Simple and Secure Ho **Main features** - Install Borg and Borgmatic from Debian package repositories - Set up Borgmatic config and bash completition -- Schedule regular backups using Cron - Export borg repo keys to localhost - Optional: Setup borgbase.com SSH key and repository via API +The Debian packages contains a systemd timer for running borgmatic every day between 0:00 and 3:00. + ## Example playbook with Cron timer and borgbase.com repository enabled No need to configure the variable `borg_repository`. It's evaluated via borgbase API call. @@ -101,8 +102,6 @@ No need to configure the variable `borg_repository`. It's evaluated via borgbase - `borgmatic_check_last`: Number of archives to check. Defaults to `3` - `borgmatic_checks`: List of consistency checks. Defaults to monthly checks. See [docs](https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/#check-frequency) for all options. - `borgmatic_config_name`: Name to use for the Borgmatic config file. Defaults to `config.yaml` -- `borgmatic_timer_hour`: Hour when regular create and prune cron/systemd-timer job will run. Defaults to `{{ 6 | random }}` -- `borgmatic_timer_minute`: Minute when regular create and prune cron/systemd-timer job will run. Defaults to `{{ 59 | random }}` - `borgmatic_hooks`: Hooks to monitor your backups e.g. with [Healthchecks](https://healthchecks.io/). See [official documentation](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/) for more. - `borgmatic_relocated_repo_access_is_ok`: Bypass Borg error about a repository that has been moved. Defaults to `false` - `borgmatic_store_atime`: Store atime into archive. Defaults to `true` diff --git a/tasks/borg.yml b/tasks/borg.yml index 342d67f..060cb12 100644 --- a/tasks/borg.yml +++ b/tasks/borg.yml @@ -18,15 +18,6 @@ cmd: "borgmatic --bash-completion > /usr/share/bash-completion/completions/borgmatic" creates: /usr/share/bash-completion/completions/borgmatic -- name: "Borg | Add borgmatic cron job" - ansible.builtin.cron: - name: "{{ borgmatic_timer_cron_name }}" - hour: "{{ borgmatic_timer_hour }}" - minute: "{{ borgmatic_timer_minute }}" - user: "{{ borg_user }}" - cron_file: "{{ borgmatic_timer_cron_name }}" - job: "borgmatic -c /etc/borgmatic/{{ borgmatic_config_name }} >/dev/null" - - name: "Borg | Init borg repository" ansible.builtin.expect: command: "borgmatic init -e {{ borg_repo_key }}"