Recover disk space safely and complete metadata-only backup updates
This commit is contained in:
1 parent
04283a607c
commit
a5a7e38853
17 files changed
+827
-209
No files matched your search
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# A backup is published only after every source, archive and remote readback passed.
|
||||
# A backup is published only after every source, archive and remote metadata check passed.
|
||||
set -Eeuo pipefail
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||
LIB_DIR="$SCRIPT_DIR/../lib/app-backup"
|
||||
@@ -118,10 +118,10 @@ if [[ $ENABLE_UPLOAD == true ]]; then
|
||||
echo '-- Remote upload started (archives and manifest; completion marker withheld)'
|
||||
BACKUP_PHASE='Remote-Upload'; UPLOAD_STATUS=COPY
|
||||
rc copy "$RUN_DIR" "$remote_run" --exclude /COMPLETE --exclude /UPLOADED --immutable
|
||||
echo '-- Remote upload finished; reading all uploaded files back for verification'
|
||||
BACKUP_PHASE='Remote-Rückleseprüfung'; UPLOAD_STATUS=CHECK
|
||||
remote_readback "$RUN_DIR" "$remote_run" --exclude /COMPLETE --exclude /UPLOADED
|
||||
echo '-- Remote readback passed; publishing completion marker'
|
||||
echo '-- Remote upload finished; checking uploaded file presence and sizes (no archive download)'
|
||||
BACKUP_PHASE='Remote-Dateiprüfung'; UPLOAD_STATUS=CHECK
|
||||
remote_metadata_check "$RUN_DIR" "$remote_run" --exclude /COMPLETE --exclude /UPLOADED
|
||||
echo '-- Remote metadata check passed; publishing completion marker'
|
||||
BACKUP_PHASE='Remote-Abschlussmarker'; UPLOAD_STATUS=MARKER
|
||||
rc copyto "$RUN_DIR/COMPLETE" "$remote_run/COMPLETE" --immutable
|
||||
# Command substitution strips trailing newlines, which could accept a marker
|
||||
@@ -136,7 +136,7 @@ PY
|
||||
date -u -Is > "$RUN_DIR/UPLOADED"
|
||||
sync -f "$RUN_DIR"
|
||||
UPLOAD_STATUS=VERIFIED
|
||||
echo '-- Remote backup fully read back and verified'
|
||||
echo '-- Remote upload confirmed (file presence, sizes and completion marker; content verification deferred to restore test)'
|
||||
fi
|
||||
|
||||
if [[ $SKIP_RETENTION == true ]]; then
|
||||
|
||||
Reference in new issue
Block a user