Recover backup capacity with verified adaptive retention

Resume pending publications under local pressure, allow verified offsite-only history as a final local recovery stage, and prune old complete remote sets against actual upload quota while preserving the newest verified copies. Document defaults, recovery limits and validation; add pressure and quota regression coverage.
This commit is contained in:
admin committed 2026-10-22 15:08:35 +02:00
1 parent a79f48bc2a
commit 6737405b35
10 files changed
+601 -31

No files matched your search

+7 -1
View File
@@ -29,7 +29,11 @@ source "$LIB_DIR/space.sh"
if [[ $CHECK == false || $PREPARE_SPACE == true ]]; then prepare_backup_space; fi
preflight
if [[ $CHECK == true ]]; then
echo 'Preflight passed. Directory metadata probed; no application backup, service stop or upload performed.'
if [[ $PREPARE_SPACE == true ]]; then
echo 'Space preparation and preflight passed. Pending uploads and pressure cleanup processed; no new application snapshot or service stop performed.'
else
echo 'Preflight passed. Directory metadata probed; no application backup, service stop or upload performed.'
fi
exit 0
fi
STAGING_DIR=$(mktemp -d "$STAGING_ROOT/${RUN_ID}.XXXXXX")
@@ -113,6 +117,8 @@ sync -f "$ARCHIVE_DIR"
echo "-- Complete local backup: $RUN_DIR"
if [[ $ENABLE_UPLOAD == true ]]; then
BACKUP_PHASE='Remote-Platzprüfung'
ensure_remote_space "$(du -sb -- "$RUN_DIR" | awk '{print $1}')" "$RUN_ID"
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)'