Adds rclone-parents, fixes some other files

This commit is contained in:
2026-02-01 17:33:47 +01:00
parent fc734321c0
commit 91e0a6c522
12 changed files with 60 additions and 18 deletions

View File

@@ -1,9 +1,10 @@
[Unit]
Description=Defragments the NAS
ConditionPathIsMountPoint=/var/mnt/nas
RequiresMountsFor=/var/mnt/nas
[Service]
Nice=19
IOSchedulingClass=idle
Type=oneshot
ExecStart=btrfs filesystem defragment -r /var/mnt/nas
[Install]
WantedBy=multi-user.target

View File

@@ -2,7 +2,8 @@
Description=Timer for the defragment-nas service
[Timer]
OnCalendar=*-*-03 00:00:00
OnCalendar=*-06-03 00:00:00
OnCalendar=*-12-03 00:00:00
Persistent=true
Unit=defragment-nas.service

View File

@@ -0,0 +1,6 @@
[Unit]
Description=Runs rclone to copy the NAS content to the parents NAS
[Service]
Type=oneshot
ExecStart=/usr/bin/flock -n /run/rclone-parents.lock /root/scripts/rclone-parents.sh

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Timer for the rclone-parents service
[Timer]
OnCalendar=08:00:00
OnCalendar=12:00:00
OnCalendar=16:00:00
OnCalendar=20:00:00
Persistent=true
Unit=rclone-parents.service
[Install]
WantedBy=timers.target

View File

@@ -1,6 +1,11 @@
[Unit]
Description=Scrubs the NAS
ConditionPathIsMountPoint=/var/mnt/nas
RequiresMountsFor=/var/mnt/nas
[Service]
Nice=19
IOSchedulingClass=idle
KillSignal=SIGINT
Type=oneshot
ExecStart=btrfs scrub start /var/mnt/nas
ExecStart=btrfs scrub start -B /var/mnt/nas

View File

@@ -2,7 +2,8 @@
Description=Timer for the scrub-nas service
[Timer]
OnCalendar=*-*-05 00:00:00
OnCalendar=*-06-05 00:00:00
OnCalendar=*-12-05 00:00:00
Persistent=true
Unit=scrub-nas.service