[orbis] Weekly backup 2026-07-07 — 8 files changed, 17 insertions(+), 160 deletions(-)

This commit is contained in:
DO Server Backup
2026-07-07 16:08:41 +00:00
parent fe18800d18
commit 9e9b76ea4a
8 changed files with 17 additions and 160 deletions
+17
View File
@@ -194,3 +194,20 @@ else
git push origin main
log "Backup complete"
fi
# ---------------------------------------------------------------------------
# 13. Zip snapshot for direct download — added 2026-07-07. Requested so the
# full backup (sites + database dumps + configs) can be downloaded
# straight from JARVIS's admin panel (Blair HQ), not just pulled via git.
# Regenerated unconditionally every run (even if nothing changed) so its
# own file timestamp always reflects when the backup last actually ran.
# Lives outside the git repo dir so it's never accidentally committed.
# ---------------------------------------------------------------------------
log "Creating downloadable zip snapshot"
ZIP_TMP="/opt/do-server-backup.zip.tmp"
ZIP_FINAL="/opt/do-server-backup.zip"
rm -f "$ZIP_TMP"
(cd "$REPO_DIR" && zip -rq "$ZIP_TMP" . -x '.git/*')
mv "$ZIP_TMP" "$ZIP_FINAL"
ZIPSIZE=$(du -sh "$ZIP_FINAL" | cut -f1)
log "Zip snapshot ready: $ZIP_FINAL ($ZIPSIZE)"