Website 1.5.0: back up the photos and files too
The nightly backup (and Back up now) snapshots backend/uploads after the database, into backups/uploads-YYYYMMDD-HHMMSS/. Unchanged files are hard links to the last snapshot, so after the first full copy a night costs only the new files. Built in a partial folder and renamed when complete, refused up front when the disk hasn't room, kept to the same count as the database backups, with its own switch on Admin -> Backups. crosscode script: an uninstall keeps the Website's backups with rsync -aH, so the snapshots' shared files stay shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,8 @@ website_keep() {
|
||||
local app dest="$2"
|
||||
app="$(website_app "$1")"
|
||||
mkdir -p "$dest"
|
||||
[ ! -d "$app/backend/backups" ] || rsync -a "$app/backend/backups/" "$dest/backups/"
|
||||
# -H: the uploads snapshots (Website 1.5.0) share unchanged files as hard links; keep them shared.
|
||||
[ ! -d "$app/backend/backups" ] || rsync -aH "$app/backend/backups/" "$dest/backups/"
|
||||
cp -p "$app/backend/.env" "$dest/backend.env" 2>/dev/null || true
|
||||
chmod -R go-rwx "$dest"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user