Skip to content
Snippets Groups Projects
Verified Commit 3ea32b72 authored by David Mehren's avatar David Mehren
Browse files

Make backup interval configurable

parent c29ca1c8
Branches
No related tags found
No related merge requests found
...@@ -37,3 +37,4 @@ borgbackup_keep_monthly: 6 ...@@ -37,3 +37,4 @@ borgbackup_keep_monthly: 6
borgbackup_keep_yearly: 0 borgbackup_keep_yearly: 0
borgbackup_use_msmtp: true borgbackup_use_msmtp: true
borgbackup_email_from: "notifications@oh14.de" borgbackup_email_from: "notifications@oh14.de"
borgbackup_interval: "hourly"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
register: service register: service
- name: Add borgbackup timer - name: Add borgbackup timer
copy: template:
src: "borgbackup.timer" src: "borgbackup.timer"
dest: "/etc/systemd/system/borgbackup.timer" dest: "/etc/systemd/system/borgbackup.timer"
owner: "root" owner: "root"
......
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
Description=borgbackup daily timer Description=borgbackup daily timer
[Timer] [Timer]
# Run whenever during each hour OnCalendar={{ borgbackup_interval }}
# every hour # run with a 55 minutes skew
OnCalendar=hourly
# with a 55 minutes skew
RandomizedDelaySec=3300 RandomizedDelaySec=3300
# and allow to be shifted around by at most 5 minutes by Systemd # and allow to be shifted around by at most 5 minutes by Systemd
AccuracySec=300 AccuracySec=300
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment