detail
Built systems/commands/BACKUP.php. Confirmed David's direction: SNAPSHOT (full platform, every file) always runs/verifies first as the safety net, then per-domain BACKUP (only files actually changed) runs after — one combined command rather than two separate steps. This is the first actual code implementation of D101/D105/D107, which previously existed only as instructions in RULES-S.md that an AI had to manually follow step by step. BACKUP.php POST takes system + files[] (item_name, path, type). Sequence per file matches D105/D107 exactly: PREVIOUS (if exists) moves to trash/ immediately with a timestamp, CURRENT (if exists) renames to PREVIOUS, live file copies to new CURRENT. Tested on Gym Logger v5.17 — all three steps executed correctly, verified all resulting files reachable via HTTP, correct version preserved at each stage. Also confirmed separately: pt_time() (used by every command — OPEN/CLOSE/REFRESH/CHECK/CLEAN/SNAPSHOT/BACKUP) correctly reads live server time in America/Los_Angeles zone — no manual time entry needed, confirmed 07/09/26 06:48 PT matches real UTC conversion.