Added timer and service, will update install script later
This commit is contained in:
8
borg/systemd/backup.service
Normal file
8
borg/systemd/backup.service
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Backup service using borg
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/borg/bin/backup
|
||||||
|
Wants=multi-user.target
|
||||||
|
|
||||||
10
borg/systemd/backup.timer
Normal file
10
borg/systemd/backup.timer
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description= Run backup every day at 4am
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 4:00:00
|
||||||
|
RandomizedDelaySec=15m
|
||||||
|
Unit=backup.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Reference in New Issue
Block a user