Release 2026.09.27.r001: support array disk rsync backups to mounted USB disks

This commit is contained in:
Mikei386
2026-09-27 16:07:00 +02:00
parent 5009dc202b
commit 106f9c9387
13 changed files with 252 additions and 15 deletions
+13
View File
@@ -10,6 +10,19 @@ import (
)
func ValidateRsyncPaths(job model.Job) error {
needsMountCheck := pathUnder(filepath.Clean(job.Rsync.Target), "/mnt/disks")
for _, source := range job.Sources {
needsMountCheck = needsMountCheck || isArrayDiskPath(source.Path) || pathUnder(filepath.Clean(source.Path), "/mnt/disks")
}
if needsMountCheck {
mounts, err := mountedPaths()
if err != nil {
return errors.New("environment: cannot inspect rsync disk mounts: " + err.Error())
}
if err := validateRsyncMounts(job, mounts); err != nil {
return err
}
}
target, err := filepath.EvalSymlinks(job.Rsync.Target)
if err != nil {
return errors.New("validation: resolve rsync target: " + err.Error())