Release 2026.09.27.r001: support array disk rsync backups to mounted USB disks
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user