Make less frequent checking the default and correctly run check only. (#30)

This commit is contained in:
Manu 2020-02-18 16:10:02 +08:00 committed by GitHub
parent e5738e9114
commit b97d42e71c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/borgba
### Optional Arguments
- `borg_encryption_passphrase`: Password to use for repokey or keyfile. Empty if repo is unencrypted.
- `borgmatic_config_name`: Name to use for the borgmatic config file. Defaults to `config.yml`
- `borgmatic_large_repo`: Does repo-checking on a weekly basis instead of daily. Good for repos with 100GB+ size.
- `borgmatic_large_repo`: Less frequent, monthly repo checking. Defaults to `true`
- `borgmatic_failure_command`: Run this command when an error occurs. E.g. `curl -s -F "token=xxx" -F "user=xxx" -F "message=Error during backup" https://api.pushover.net/1/messages.json`
- `borgmatic_before_backup_command`: Run this command before the backup. E.g. `dump-a-database /to/file.sql`
- `borgmatic_after_backup_command`: Run this command after the backup. E.g. `rm /to/file.sql`

View File

@ -2,7 +2,7 @@
borg_encryption_passphrase: ''
borg_exclude_patterns: []
borgmatic_config_name: config.yaml
borgmatic_large_repo: false
borgmatic_large_repo: true
borgmatic_failure_command:
- echo "`date` - Error while creating a backup."
borgmatic_before_backup_command: []

View File

@ -93,7 +93,7 @@
minute: "{{ 59 | random }}"
user: "root"
cron_file: borgmatic
job: "/usr/local/bin/borgmatic -c /etc/borgmatic/{{ borgmatic_config_name }}"
job: "/usr/local/bin/borgmatic -c /etc/borgmatic/{{ borgmatic_config_name }} --check"
when: borgmatic_large_repo
- name: Add cron-job for borgmatic (normal-sized repo)