added timer, fixed /root typo
This commit is contained in:
@@ -42,5 +42,5 @@ restic backup \
|
||||
--verbose \
|
||||
{% if pillar.podman is defined %}{{ salt['cmd.run']('podman info -f "{{.Store.VolumePath}}"', runas=pillar.podman.user ) }} \{% endif %}
|
||||
/etc \
|
||||
/ root \
|
||||
/root \
|
||||
/home
|
||||
|
10
restic/files/restic-backup.service.jinja
Normal file
10
restic/files/restic-backup.service.jinja
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run restic backup
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User={{ pillar.restic.user }}
|
||||
ExecStart={{ salt['user.info'](pillar.restic.user).home }}/bin/backup.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
10
restic/files/restic-backup.timer.jinja
Normal file
10
restic/files/restic-backup.timer.jinja
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Restic backup timer
|
||||
|
||||
[Timer]
|
||||
OnCalendar={{ pillar.restic.OnCalendar }}
|
||||
RandomizedDelaySec=300
|
||||
Unit=restic-backup.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user