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