Add ability to control RandomizedDelaySec of matrix-backup-borg.timer

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2068
This commit is contained in:
Slavi Pantaleev 2022-08-28 18:05:59 +03:00
parent 7b77153d8b
commit a0ecf13cdb
2 changed files with 5 additions and 2 deletions

View file

@ -26,8 +26,11 @@ matrix_backup_borg_systemd_required_services_list: ['docker.service']
# List of systemd services that matrix-backup-borg.service wants
matrix_backup_borg_systemd_wanted_services_list: []
# systemd calendar configuration for backup job
# systemd calendar configuration for the backup job
# the actual job may run with a delay (see matrix_backup_borg_schedule_randomized_delay_sec)
matrix_backup_borg_schedule: "*-*-* 04:00:00"
# the delay with which the systemd timer may run in relation to the `matrix_backup_borg_schedule` schedule
matrix_backup_borg_schedule_randomized_delay_sec: 2h
# what directories should be added to backup
matrix_backup_borg_location_source_directories: []

View file

@ -4,7 +4,7 @@ Description=Matrix Borg Backup timer
[Timer]
Unit=matrix-backup-borg.service
OnCalendar={{ matrix_backup_borg_schedule }}
RandomizedDelaySec=2h
RandomizedDelaySec={{ matrix_backup_borg_schedule_randomized_delay_sec }}
[Install]
WantedBy=timers.target