Show periodic rclone progress and remote verification phases
This commit is contained in:
1 parent
ff152c7f0f
commit
fe50bb42a1
8 files changed
+83
No files matched your search
@@ -98,8 +98,11 @@ echo "-- Complete local backup: $RUN_DIR"
|
||||
if [[ $ENABLE_UPLOAD == true ]]; then
|
||||
remote_run="${RCLONE_REMOTE_BASE%/}/$RUN_ID"
|
||||
# Upload COMPLETE last. An interrupted upload cannot look like a valid set.
|
||||
echo '-- Remote upload started (archives and manifest; completion marker withheld)'
|
||||
rc copy "$RUN_DIR" "$remote_run" --exclude /COMPLETE --exclude /UPLOADED --immutable
|
||||
echo '-- Remote upload finished; reading all uploaded files back for verification'
|
||||
rc check "$RUN_DIR" "$remote_run" --download --exclude /COMPLETE --exclude /UPLOADED
|
||||
echo '-- Remote readback passed; publishing completion marker'
|
||||
rc copyto "$RUN_DIR/COMPLETE" "$remote_run/COMPLETE" --immutable
|
||||
marker=$(rc cat "$remote_run/COMPLETE")
|
||||
[[ $marker == "$(cat "$RUN_DIR/COMPLETE")" ]] || die 'Remote completion marker mismatch'
|
||||
|
||||
@@ -45,7 +45,9 @@ mkdir -m 700 "$INPUT"
|
||||
if [[ -n $REMOTE_RUN ]]; then
|
||||
[[ $REMOTE_RUN =~ ^[a-zA-Z0-9][a-zA-Z0-9_-]+$ && $REMOTE_RUN == "$ARCHIVE_PREFIX"_* ]] || die 'Unsafe remote run name'
|
||||
check_remote
|
||||
echo "-- Downloading remote backup for restore verification: $REMOTE_RUN"
|
||||
rc copy "${RCLONE_REMOTE_BASE%/}/$REMOTE_RUN" "$INPUT"
|
||||
echo '-- Remote backup downloaded; validating manifest, hashes and archives'
|
||||
else
|
||||
[[ -d $LOCAL_RUN && ! -L $LOCAL_RUN ]] || die 'Local run must be an existing directory'
|
||||
# Resolve overlap separately: archive sources are allowed under WORKDIR, but
|
||||
|
||||
Reference in new issue
Block a user