
B8 — 災難復原 / 備份
B8.1 各組件的備份策略
| 組件 | 備份方式 | 頻率 |
|---|---|---|
| GHL Contacts | UI: Contacts → Bulk Actions → Export to CSV | 每月一次 |
| GHL Opportunities | UI: Opportunities → 右上 Menu → Export | 每月一次 |
| GHL Custom Fields / Tags / Pipelines | API GET /locations/{id}/customFields 等抓 JSON | 每月一次 |
| GHL Workflows | UI 內 export(GHL 內建)— 各 workflow 三點 → Export | 每次重大修改後 |
| GHL Blog posts(本手冊) | API GET /blogs/posts 抓 rawHTML 存檔 | 每次更新後 |
| n8n workflows | n8n UI 內 export JSON + git 版控 | 每次修改 |
| n8n credentials | n8n 本機加密儲存,記得保留 Zeabur 環境變數備份 | — |
| SHOPLINE 訂單 | SHOPLINE 後台 export,但主要靠 webhook 推給 GHL/n8n | 季度 export 對帳 |
B8.2 GHL 資料 export 步驟
聯絡人 export
- Contacts → 全選(或選特定 Smart List)
- 右上 Bulk Actions → Export
- 等 email 到 → 下載 CSV
- 檔名加日期存 Google Drive:
ohana-contacts-YYYYMMDD.csv
Opportunities export
- Opportunities → 選 pipeline(分別 export Lead + AR)
- 右上三點 → Export
- CSV 包含 stage / 金額 / contact / 自訂欄位
Workflows export
- Automation → 每個 workflow 點進去 → 右上 ... → Export
- 下載 .json 存 git 控管:
workflows/01-ar-3day-reminder.json
B8.3 n8n 備份
n8n 主要 flow JSON 在 git 控管:
/Users/macbook/Desktop/Kimino CRM/ ├ shopline-ghl-sync.n8n.json ← SHOPLINE→GHL 同步主 flow ├ Flow 3_ 每日 AR 帳齡重算.json ← AR aging recalc ├ gen_n8n.py ← shopline-ghl-sync 的產生器(source of truth) └ shopline-ghl-sync.n8n.json.bak-* ← 歷史 backup
B8.4 災難情境演練
情境 1:n8n 整個掛了
- 影響:SHOPLINE 訂單暫時不會自動建 AR 卡(SHOPLINE webhook 會 retry)
- 緩解:Zeabur 重啟 n8n;若超過 24 小時無法救,手動匯入 SHOPLINE 訂單到 GHL(用 import CSV)
- 恢復後:SHOPLINE webhook 會自動 replay 漏掉的訂單(SHOPLINE 有 retry 機制)
情境 2:GHL location 整個被刪 / 損毀
- 影響:CRM 完全沒資料
- 緩解:聯絡 Hexona support 緊急復原(他們有 backup);如無法復原 → 從每月 CSV 備份 + workflow JSON + n8n flow JSON 重建
- 預防:每月 export 一次 + 存 Google Drive 異地
情境 3:PIT token 外洩
- 影響:外人可改 contacts / opportunities / tags
- 緩解:立即到 Settings → Private Integrations 撤銷該 token + 走 PIT 輪替 SOP(B6.4)
情境 4:Hexona 整個服務中斷
- 影響:無法存取 GHL UI 與 API
- 緩解:等 Hexona 修;期間用 CSV 備份對外作業
B8.5 建議的月度健檢清單
- [ ] GHL Contacts CSV export(全部 + 各 Smart List)
- [ ] GHL Opportunities CSV export(Lead + AR)
- [ ] GHL Custom Fields / Tags / Pipelines JSON API 抓存
- [ ] n8n executions 失敗統計
- [ ] SHOPLINE 訂單對帳(SHOPLINE 後台 vs CRM 累計)
- [ ] PIT token 健康(沒過期、scopes 正確)
- [ ] manual.ohnainc.com 域名健康