Added syncthing backups

This commit is contained in:
willem.serruys
2025-10-04 17:29:59 +02:00
parent a4d9535851
commit 2cd51d0ba8
4 changed files with 50 additions and 0 deletions

View 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

View 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

View 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

View 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