4145e7b500
Two rsync bugs found during Immich cross-drive backup testing: Fix 3: Simplified destination path structure in runRsyncBackup. Old SplitN logic kept "storage/immich" as a subpath, creating redundant nesting: backups/rsync/immich/storage/immich/<data>. New logic: single mount → rsync directly into the stack folder; multiple mounts → use each mount's leaf dir name as subfolder (disambiguated by _N suffix). Fix 4: Exclude app-internal DB dump files from rsync. Apps like Immich store periodic pg_dumps in <data>/backups/*.sql.gz. The controller already handles DB backups via pg_dump — copying them again wastes space. Added --exclude backups/*.sql.gz/sql/dump to the rsync command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>