Repository navigation
Conversation
The default local destination has no path, so Mirror mode wrote to and restored from "vdbackup" relative to the worker's cwd. Default it to .mirror in the user's backups dir, and refuse a local Mirror path that fails safe_local_dest, as a full backup's local copy already does. A failed APK sync now also fails the mirror instead of being ignored. Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
Open
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backend #11. With the default local destination (no
dests/local.json),DPATHis empty andremote_pfxis justvdbackup, relative to the worker's cwd. Mirror backups failed on a read-only/or landed somewhere unintended, and Mirror restore read the same relative path.do_mirroralso never checked the local path againstsafe_local_dest, unliketransfer_full.mirror_local_dest(used bydo_mirroranddo_restore_mirror): for a local destination with no path,DPATHbecomes<backups dir>/.mirror(/data/media/<u>/VDBackup/.mirror, hidden from the backup list like.paths/.adb). Thensafe_local_destmust pass, elseERR_DEST_UNSAFE(existing code and message).do_mirror: the APK sync result is now checked; a failure fails the mirror withERR_TRANSFERlike the other items (_bfailis set up before it).Mirror data from the old relative path, if any ever landed somewhere, is not migrated.
Testing
sh -n,mksh -n,busybox sh -n;shellcheck -s sh: same warnings as main.remote_pfx,mirror_local_dest,safe_local_destanddo_mirrorwith stubbed rsync/pm/freeze, under mksh R59, busybox 1.37 ash and dash, run from/: default dest becomes/data/media/0/VDBackup/.mirrorand the prefix is absolute;/data/adb/xis refused withERR_DEST_UNSAFE; rclone dest untouched; a failing APK rsync ends withERR_TRANSFER, a clean run withok.