1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic.git synced 2024-12-11 23:41:32 +01:00

template change and README clarification

This commit is contained in:
Felix Andersen 2024-01-04 17:52:05 +00:00
parent 4d21e0f4c1
commit 09af54284a
2 changed files with 7 additions and 1 deletions

View file

@ -179,6 +179,7 @@ Available variables:
| `mail_on_error` | no | Optionally send a mail if the backupjob will fail *(mailx is required)* |
| `mail_address` | if `mail_on_error` is true | The mail addressto recive mails if you enabled ``mail_on_error``. |
| `monitoring_call` | no | A command that will be called if the backup is *successful*. Useful for heartbeat monitoring systems that warn when no heartbeat is received. Use the full command, you need to run. Example: `curl https://monitoring.example.com/api/push/E9Wzm4lJ2O?status=up&msg=OK&ping=` |
| `niceness` | no | If set, runs any scheduled backup with given [niceness-value](https://en.wikipedia.org/wiki/Nice_(Unix)). On Linux -20 is highest priority, 0 default and 19 is lowest priority. 10 is a common low priority assigned to backup routines on production systems. |
Example:
```yaml
@ -197,6 +198,7 @@ restic_backups:
stdin_filename: db_name_dump.sql
scheduled: true
schedule_oncalendar: '*-*-* 01:30:00'
niceness: 10
```
> You can also specify restic_backups as an array, which is a legacy feature and

View file

@ -10,6 +10,10 @@ Type=oneshot
{% if item.lvm is defined %}
PrivateMounts=on
{% endif %}
ExecStart=/usr/bin/nice {{ restic_script_dir }}/backup-{{ item.name }}.sh
{% if item.niceness is defined %}
ExecStart=/usr/bin/nice -n {{ item.niceness }} {{ restic_script_dir }}/backup-{{ item.name }}.sh
{% else %}
ExecStart={{ restic_script_dir }}/backup-{{ item.name }}.sh
{% endif %}
TimeoutStartSec=0
Environment="CRON=true"