From 03772cff9bbb182632cc69ba2001c19d378138db Mon Sep 17 00:00:00 2001 From: type-two Date: Fri, 24 Jul 2026 22:35:26 +1000 Subject: [PATCH] Depot backup to Drive, and publish the first asset through the hub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PUBLISHED. wg-harvest-demo.glb (a dressed character: character_kit body + a garment harvested off a Ready Player Me donor) went to the live depot through wardrobegod's own export hub. 773 -> 774 assets, and fetching it back over the PUBLIC Cloudflare front — exactly what thriftgod does at runtime — returns 200, the exact byte count, and valid glTF magic. The whole publish path is proven end to end, not just the upload half. BACKUP. depot/archive.sh, deployed to ultra:~/depot-backups/ (outside ~/Documents because of the launchd TCC trap, absolute homebrew paths), following the existing MeshGod flow: ultra rsyncs the VPS asset dir, rclone pushes to gdrive:DB-BACKUP/3god-depot alongside the sibling archives. Not Gitea: git has no delta compression for binary blobs, so 774 GLBs would grow that repo without bound on every re-upload, and Gitea sits on the disk-tight old box. Wrong tool for 7.5 GB of meshes that only ever get added to. One deliberate divergence from the MeshGod script it is modelled on: NO PRUNING. MeshGod deletes VPS .glb older than 180 days because its gallery keeps thumb+index so stale entries still list. This depot is live runtime infrastructure — two shipping games resolve assets from it BY FILENAME at runtime, so pruning an old mesh is a 404 in a released game. Archive only. Also inherits the fleet-wide risk already logged in the backup-verify skill: gdrive: uses rclone's shared Google client_id, retired by Google during 2026, and every Drive flow dies with it. Co-Authored-By: Claude Opus 4.8 --- depot/README.md | 21 +++++++++++++++++++++ depot/archive.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 depot/archive.sh diff --git a/depot/README.md b/depot/README.md index d5e84e7..6147307 100644 --- a/depot/README.md +++ b/depot/README.md @@ -57,3 +57,24 @@ any tags or notes**, so nothing needed migrating into wardrobegod's manifest. Ta `ssh://git@100.71.119.27:222/monster/3GOD.git` (Gitea on the old box) can be archived once this copy is committed. The running VPS service is unaffected — it is deployed, not sourced live from that checkout. ultra's `~/Documents/3GOD` is a dev copy holding 4 files and its `:8788` is closed. + +## Backup + +`archive.sh` (deployed to `ultra:~/depot-backups/archive.sh` — outside `~/Documents` because +launchd + TCC) follows the MeshGod flow: ultra rsyncs the VPS asset dir, then rclones to +**`gdrive:DB-BACKUP/3god-depot`**. 7.5 GB / 774 assets. + +**Not git.** Git has no delta compression for binary blobs, so 774 GLBs would grow the Gitea repo +without bound on every re-upload, and Gitea lives on the disk-tight old box. + +**Deliberate difference from the MeshGod flow: NO PRUNING.** MeshGod prunes VPS `.glb` older than +180 days because its gallery keeps thumb+index so stale entries still list. This depot is live +runtime infrastructure — thriftgod and procity fetch assets *by filename at runtime*, so deleting +an old GLB breaks a shipping game with a 404. Archive only, never prune. + +Verify freshness the same way as the other flows: +`rclone lsl gdrive:DB-BACKUP/3god-depot --include "*.glb" --max-age 36h` + +⚠️ Shares the whole-fleet risk noted in the backup-verify skill: the `gdrive:` remote uses +rclone's shared Google client_id, which Google retires during 2026. When it dies every Drive flow +breaks at once, this one included. diff --git a/depot/archive.sh b/depot/archive.sh new file mode 100644 index 0000000..3022063 --- /dev/null +++ b/depot/archive.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# 3GOD depot (now wardrobegod's depot/) → Google Drive. Mirrors ~/meshgod-backups/archive.sh: +# ultra pulls the VPS asset dir, pushes off-site to gdrive:DB-BACKUP. +# +# DELIBERATE DIFFERENCE FROM THE MESHGOD FLOW: **NO PRUNING.** meshgod prunes VPS .glb older than +# 180d because its gallery keeps thumb+index so old entries still list. This depot is LIVE RUNTIME +# INFRASTRUCTURE — thriftgod (web/index.html:1176) and procity (loaders.js:7) fetch assets from it +# by filename at runtime, so deleting an old .glb breaks a shipping game with a 404. Archive only. +# +# Lives outside ~/Documents on purpose (launchd + TCC), uses absolute homebrew paths. +set -u +LOCAL="$HOME/depot-backups"; REMOTE="gdrive"; DEST="DB-BACKUP/3god-depot" +VPS="root@100.94.195.115"; SRC="/opt/3god/assets" +LOG="$LOCAL/archive.log"; RCLONE=/opt/homebrew/bin/rclone +STAMP=$(date "+%Y-%m-%d %H:%M"); mkdir -p "$LOCAL/assets" + +if rsync -a --delete-excluded -e "ssh -o ConnectTimeout=15" "$VPS:$SRC/" "$LOCAL/assets/" 2>>"$LOG"; then + echo "$STAMP pulled depot from VPS ($(ls "$LOCAL/assets" | wc -l | tr -d ' ') files)" >> "$LOG" +else + echo "$STAMP WARN pull failed" >> "$LOG"; exit 1 +fi + +# meta.json carries the depot's tag/note sidecar — small but the only non-reconstructable bit. +if "$RCLONE" copy "$LOCAL/assets" "$REMOTE:$DEST" \ + --include "*.glb" --include "*.png" --include "*.jpg" --include "*.jpeg" --include "*.webp" \ + --include "meta.json" \ + --transfers 3 --checkers 4 --log-file "$LOG" --log-level INFO; then + N=$("$RCLONE" size "$REMOTE:$DEST" --json 2>/dev/null | /usr/bin/sed -n 's/.*"count":\([0-9]*\).*/\1/p') + echo "$STAMP pushed to $REMOTE:$DEST (remote now $N objects)" >> "$LOG" +else + echo "$STAMP WARN rclone push failed" >> "$LOG"; exit 1 +fi