Added syncthing backups
This commit is contained in:
14
systemd/recurring-tasks/syncthing-cold-backup.service
Normal file
14
systemd/recurring-tasks/syncthing-cold-backup.service
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Backup Syncthing - Cold
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=syncting-backup --mode cold --sourceFolder /mnt/usb/syncting/hot --targetFolder /mnt/usb/syncting/cold --backupName syncting
|
||||||
|
WorkingDirectory=/etc/syncting
|
||||||
|
Restart=off
|
||||||
|
User=willem
|
||||||
|
Environment=PATH=/usr/bin:/usr/local/bin
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
11
systemd/recurring-tasks/syncthing-cold-backup.timer
Normal file
11
systemd/recurring-tasks/syncthing-cold-backup.timer
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Run Syncthing cold backup Service every day
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=1min
|
||||||
|
OnUnitActiveSec=1day
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
|
|
||||||
14
systemd/recurring-tasks/syncthing-hot-backup.service
Normal file
14
systemd/recurring-tasks/syncthing-hot-backup.service
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Backup Syncthing - Hot
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=syncthing-backup --mode hot --sourceFolder /etc/syncthing --targetFolder /mnt/usb/syncthing/hot --backupName syncthing
|
||||||
|
WorkingDirectory=/etc/syncthing
|
||||||
|
Restart=off
|
||||||
|
User=willem
|
||||||
|
Environment=PATH=/usr/bin:/usr/local/bin
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
11
systemd/recurring-tasks/syncthing-hot-backup.timer
Normal file
11
systemd/recurring-tasks/syncthing-hot-backup.timer
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Run Syncthing hot backup Service every hour
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=1min
|
||||||
|
OnUnitActiveSec=1hour
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
|
|
||||||
Reference in New Issue
Block a user