Confirmed the hard way, live, on the migrated deployment: backup.sh
stopped every writer container, archived everything, restarted
containers -- all successfully -- and only failed on "rclone: command
not found" that run. Re-running after the rclone self-install fix then
hit a second, deeper problem: backup/.env itself had been wiped by the
Dokploy redeploy in between, since it lived next to backup.sh inside the
git checkout. This is the exact backup/restore-vs-AutoDeploy
architectural tension flagged earlier in this project but never
resolved until now -- same category of bug as backend/.env and
tenants.json before it.
BACKUP_ENV_FILE (new, defaults to the old next-to-the-script path for
local dev / a traditional non-Dokploy VPS, where the checkout is
stable) lets a Dokploy deployment's cron entry point backup.sh at
$SIGHTBOX_DATA_DIR/backup.env instead -- durable, survives every
redeploy, same pattern as TENANTS_JSON_PATH. Documented in both
INSTALLATION_PLAYBOOK.md Stage 10 and BACKUP_RESTORE.md, including the
corrected cron entry (the Dokploy-managed checkout path, not the
traditional /opt/sightbox/app assumption the original cron example
baked in).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y