mirror of
https://github.com/myronblair/do-server-config
synced 2026-07-27 12:54:21 -05:00
[orbis] Weekly backup 2026-07-07 — 8 files changed, 17 insertions(+), 160 deletions(-)
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user