add systemd setup for tarsnap
This commit is contained in:
parent
68bf4e932d
commit
7d3d5e4ed0
|
@ -0,0 +1,12 @@
|
|||
# systemctl enable /path/to/this/unit-file
|
||||
|
||||
[Unit]
|
||||
Description=Backup documents folder to Tarsnap
|
||||
Wants=tarsnap.timer
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c "/usr/bin/tarsnap -c --print-stats -f \"$(uname -n)-$(date +%%Y-%%m-%%d_%%H-%%M-%%S)\" /home/rob/Documents/"
|
||||
WorkingDirectory=/root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
|||
# systemctl enable /path/to/this/unit-file
|
||||
|
||||
[Unit]
|
||||
Description=Run tarsnap.service every six hours
|
||||
Requires=tarsnap.service
|
||||
|
||||
[Timer]
|
||||
Unit=tarsnap.service
|
||||
OnCalendar=*-*-* 00:00:00
|
||||
OnCalendar=*-*-* 06:00:00
|
||||
OnCalendar=*-*-* 12:00:00
|
||||
OnCalendar=*-*-* 18:00:00
|
||||
RandomizedDelaySec=3m
|
||||
AccuracySec=1s
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Reference in New Issue