rclone: safer restores, RSYNCRMDIR, drop legacy mount code#3055
rclone: safer restores, RSYNCRMDIR, drop legacy mount code#3055maxengel wants to merge 1 commit into
Conversation
daa008f to
8247f63
Compare
8247f63 to
8be2f6f
Compare
|
Correction to the description: |
8be2f6f to
dc0ff93
Compare
Correctness and safety cleanup of the cloud backup/restore tools: - Restore can no longer delete local data: --delete-excluded is stripped during restore option normalization. The filter rules are an allowlist, so on a RESTOREMETHOD="sync" restore that flag would have deleted everything local that isn't a save/state/screenshot (ROMs, BIOS, artwork). Backup keeps it, where it only tidies the remote. Also removes the dead RESTORE_RCLONEOPTS assignment. - Implement RSYNCRMDIR: it shipped enabled and documented but no script ever read it. After a successful game-saves backup, cloud_backup now prunes empty remote directories via rclone rmdirs --leave-root. - Report rclone exit code 9 as "no files transferred" instead of a retry failure, add --stats-one-line to the game-saves flows, and remove controller-input regex branches that could never match (quoted patterns were compared literally). - Apply the capability-checked --progress-terminal-width flag in all four rclone flows instead of only the system-backup restore. - cloud_sync_helper: create the initial config with sed so multi-line backslash-continued values like RCLONEOPTS survive intact; the old line-based loop truncated them. - Remove the pre-cloud_sync legacy path: the rclonectl FUSE-mount wrapper and its rsync.conf/rsync-rules.conf (reachable only via manual SSH, no UI entry) plus the post-update block that re-seeded them on every OS update, and 001-setup's boot-time reset of the now-removed cloud-mount toggle state. Existing copies on user storage are left untouched. 💘 Generated with Crush Assisted-by: Crush:anthropic/claude-fable-5
dc0ff93 to
e35e5e8
Compare
|
Rebased onto current |
Correctness and safety cleanup of the cloud backup/restore tools, squashed to a single commit for review. Docs PR: ROCKNIX/rocknix.org#176.
RESTOREMETHOD="sync"restore a user-supplied--delete-excludedwould delete everything local that isn't a save/state/screenshot (ROMs, BIOS, artwork). It is now stripped during restore option normalization (same pattern as the existing--verbosestrip); backup keeps it, where it only tidies the remote. Also removes the deadRESTORE_RCLONEOPTSassignment.RSYNCRMDIRactually works now. It shipped enabled and documented on rocknix.org, but no script ever read it. After a successful game-saves backup,cloud_backupprunes empty remote directories viarclone rmdirs --leave-root(non-fatal on failure).cloud_synccode removed: therclonectlFUSE-mount wrapper and itsrsync.conf/rsync-rules.conf(reachable only via manual SSH, no UI entry) plus the post-update block that re-seeded them on every OS update. Existing copies on user storage are left untouched.--stats-one-linein the game-saves flows; removal of controller-input regex branches that could never match (quoted patterns were compared literally);cloud_sync_helpernow creates the initial config withsedso the multi-lineRCLONEOPTSdefault survives intact.Verified with
tools/pkgcheck(rclone + rocknix packages),bash -non all touched scripts, and a repo-wide grep for dangling references.💘 Generated with Crush