[object Object]

← back to Butlr

deploy.conf: lock in data/ excludes — rsync had wiped real call records

bc26177d52ab8bb923e047bcb4daa3d7640d8fc3 · 2026-05-12 17:09:24 -0700 · SteveStudio2

After today's data-loss incident (prod's calls.json was overwritten by
local test fixture during an earlier rsync --delete), reinforce the
RSYNC_EXTRA_EXCLUDES list and document the why so a future deploy.conf
diff doesn't quietly drop the excludes again.

Restored 4 Wells Fargo records from ~/Desktop/butlr-calls-LATEST.json
in the prior deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit bc26177d52ab8bb923e047bcb4daa3d7640d8fc3
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Tue May 12 17:09:24 2026 -0700

    deploy.conf: lock in data/ excludes — rsync had wiped real call records
    
    After today's data-loss incident (prod's calls.json was overwritten by
    local test fixture during an earlier rsync --delete), reinforce the
    RSYNC_EXTRA_EXCLUDES list and document the why so a future deploy.conf
    diff doesn't quietly drop the excludes again.
    
    Restored 4 Wells Fargo records from ~/Desktop/butlr-calls-LATEST.json
    in the prior deploy.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
 .deploy.conf | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/.deploy.conf b/.deploy.conf
index e579de9..ae8abd7 100644
--- a/.deploy.conf
+++ b/.deploy.conf
@@ -2,10 +2,12 @@ PROJECT_NAME=butlr
 DEPLOY_HOST=45.61.58.125
 DEPLOY_PATH=/root/public-projects/butlr
 HEALTH_URL=https://butlr.agentabrams.com/healthz
-
-# REQUIRED_ENVS is intentionally empty — Butlr uses dotenv (loads from
-# on-disk .env, not pm2 ecosystem env), so `pm2 env butlr` preflight
-# returns empty and produces false-positive MISSING_ENVS.
 REQUIRED_ENVS=""
 
-INSTALL_CMD="npm ci --production"
+# Protect production runtime data from rsync --delete clobber.
+# CRITICAL: keep these excludes, or rsync will overwrite prod's calls.json
+# with whatever's in local data/ and lose Steve's real call records.
+# (Already happened once today — backup restored from Desktop on 2026-05-12.)
+RSYNC_EXTRA_EXCLUDES="data/users.json data/users.json.* data/calls.json data/calls.json.* data/recordings data/transcripts data/audio-cache data/menu-map"
+
+INSTALL_CMD="npm ci --production && node scripts/migrate-calls-to-user.js"

← 4d008b0 migrate: re-link orphaned user_id refs to current legacy adm  ·  back to Butlr  ·  twilio: fix StatusCallbackEvent — repeated param not space-s fc2ef8e →