Ajout de l'option force_calendar pour choisir l'heure des backups restic
parent
6fc7c0a2e0
commit
ca5ef757f8
|
@ -48,12 +48,14 @@ loc_restic:
|
|||
- /etc
|
||||
- /var
|
||||
pool:
|
||||
force_calendar: "5:00"
|
||||
to_exclude:
|
||||
- "*.pyc"
|
||||
- "\\#*\\#"
|
||||
- "*~"
|
||||
to_backup:
|
||||
- /pool/home
|
||||
- /pool/mail
|
||||
retention:
|
||||
- [--keep-daily, 4]
|
||||
- [--keep-weekly, 4]
|
||||
|
|
|
@ -9,6 +9,8 @@ la [documentation](gitlab.crans.org/nounous/documentation).
|
|||
glob_restic: (ou loc_restic dans host_vars)
|
||||
config:
|
||||
<nom>:
|
||||
force_calendar: si n'existe pas, utilise une heure aléatoire, si existe
|
||||
force une heure.
|
||||
to_exclude: chemins à ne pas backuper
|
||||
to_backup: chemins à backuper
|
||||
retention: règles de conservations
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
[Unit]
|
||||
|
||||
[Timer]
|
||||
{% if restic.config[item.0].force_calendar is defined %}
|
||||
OnCalendar={{ restic.config[item.0].force_calendar }}
|
||||
{% else %}
|
||||
OnCalendar={{ 24 | random(seed=inventory_hostname+item.0) }}:{{ 60 | random(seed=inventory_hostname+item.0) }}
|
||||
{% endif %}
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
|
|
Loading…
Reference in New Issue