WI-003: Backup & Recovery¶
ID: WI-003 | Version: 1.0 | Date: 2026-02-10
Applies To: Paul (primary), Maya (oversight)
Purpose¶
Step-by-step procedures for creating weekly baselines, tactical config snapshots, and recovering from failures.
For the overall backup strategy, recovery scenarios, and archive locations, see:
→ Backup & Recovery Plan (Tech-Pub)
1. Weekly Baseline (Paul, every Monday)¶
Create the baseline¶
# Set week identifier
WEEK=$(date +%Y-W%V)
BASEDIR=~/archive/baselines/$WEEK
mkdir -p "$BASEDIR"
# Archive Tech-Pub (exclude .git internals)
cd ~/.openclaw/workspace/Tech-Pub
tar czf "$BASEDIR/Tech-Pub-$WEEK.tar.gz" --exclude='.git' .
# Archive Dev-Ops
cd ~/.openclaw/workspace/Dev-Ops
tar czf "$BASEDIR/Dev-Ops-$WEEK.tar.gz" --exclude='.git' .
# Archive OpenClaw config + agent workspaces
tar czf "$BASEDIR/openclaw-config-$WEEK.tar.gz" \
-C /home/skai8888/.openclaw \
openclaw.json \
workspace/SOUL.md workspace/IDENTITY.md workspace/USER.md workspace/TOOLS.md \
workspace/MEMORY.md workspace/HEARTBEAT.md \
workspace/memory/ \
agents/Saul/workspace/ agents/Rex/workspace/ agents/Paul/workspace/ \
agents/Leonardo/workspace/ agents/Devin/workspace/ agents/Tom/workspace/ \
agents/General/workspace/ \
2>/dev/null
Create manifest¶
cat > "$BASEDIR/manifest.md" << EOF
# Baseline $WEEK
**Created:** $(date -Iseconds)
**Created by:** Paul (infra-001)
## Contents
| File | Size |
|------|------|
| Tech-Pub-$WEEK.tar.gz | $(du -h "$BASEDIR/Tech-Pub-$WEEK.tar.gz" | cut -f1) |
| Dev-Ops-$WEEK.tar.gz | $(du -h "$BASEDIR/Dev-Ops-$WEEK.tar.gz" | cut -f1) |
| openclaw-config-$WEEK.tar.gz | $(du -h "$BASEDIR/openclaw-config-$WEEK.tar.gz" | cut -f1) |
## Notes
$(cd ~/.openclaw/workspace/Tech-Pub && echo "Tech-Pub HEAD: $(git log --oneline -1)")
$(cd ~/.openclaw/workspace/Dev-Ops && echo "Dev-Ops HEAD: $(git log --oneline -1)")
EOF
Notify Simon¶
Report to Maya's session that the baseline is ready for download. Include the folder path and total size.
Clean up old baselines¶
# Delete baselines older than 4 weeks
find ~/archive/baselines/ -maxdepth 1 -type d -mtime +28 -exec rm -rf {} \;
2. Tactical Config Snapshot (after significant config changes)¶
When openclaw.json or agent SOUL.md files are changed significantly (model upgrades, agent additions/removals, structural changes):
DATE=$(date +%Y%m%d)
DEST=~/.openclaw/workspace/Dev-Ops/archive/ai-swarm-backups
# Snapshot config
cp /home/skai8888/.openclaw/openclaw.json "$DEST/config/openclaw-$DATE.json"
# Snapshot all SOULs
for agent_dir in /home/skai8888/.openclaw/agents/*/workspace/SOUL.md; do
agent=$(echo "$agent_dir" | sed 's|.*/agents/\([^/]*\)/.*|\1|')
cp "$agent_dir" "$DEST/agent-souls/$agent-SOUL.md"
done
cp /home/skai8888/.openclaw/workspace/SOUL.md "$DEST/agent-souls/Maya-SOUL.md"
# Commit to Dev-Ops
cd ~/.openclaw/workspace/Dev-Ops
git add archive/ai-swarm-backups/
git commit -m "Tactical backup: config + SOULs $DATE"
3. Recovery: Config from Backup¶
# Stop gateway
openclaw gateway stop
# Option A: From Dev-Ops tactical archive
cp ~/.openclaw/workspace/Dev-Ops/archive/ai-swarm-backups/config/openclaw-YYYYMMDD.json \
/home/skai8888/.openclaw/openclaw.json
# Option B: From weekly baseline
cd ~/archive/baselines/YYYY-Wnn/
tar xzf openclaw-config-*.tar.gz -C /home/skai8888/.openclaw openclaw.json
# Restart
openclaw gateway start
openclaw agents list # verify
4. Recovery: SOUL.md from Backup¶
# Option A: From Git history
cd /home/skai8888/.openclaw/agents/[Agent]/workspace/
git log --oneline SOUL.md
git checkout [commit-hash] -- SOUL.md
# Option B: From Dev-Ops tactical archive
cp ~/.openclaw/workspace/Dev-Ops/archive/ai-swarm-backups/agent-souls/[Agent]-SOUL.md \
/home/skai8888/.openclaw/agents/[Agent]/workspace/SOUL.md
# Restart gateway to reload
openclaw gateway restart
5. Recovery: Full Repository¶
# Re-clone from GitHub
cd ~/.openclaw/workspace/
rm -rf Tech-Pub # or Dev-Ops
git clone git@github.com-coown:coown-box/Tech-Pub.git
# or: git clone git@github.com-coown:coown-box/Dev-Ops.git
If GitHub is also lost, restore from baseline:
cd ~/.openclaw/workspace/
mkdir Tech-Pub && cd Tech-Pub
tar xzf ~/archive/baselines/YYYY-Wnn/Tech-Pub-*.tar.gz
git init && git add -A && git commit -m "Restored from baseline YYYY-Wnn"
6. Verification Checklist¶
After any recovery:
- [ ]
openclaw gateway status— gateway running - [ ]
openclaw agents list— all 8 agents visible (Maya, Saul, Rex, Paul, Leonardo, Devin, Tom, General) - [ ] Test Maya: quick question in webchat
- [ ]
cd ~/.openclaw/workspace/Tech-Pub && git status— clean, remote configured - [ ]
cd ~/.openclaw/workspace/Dev-Ops && git status— clean, remote configured - [ ] Log the recovery in
memory/YYYY-MM-DD.mdandDev-Ops/incidents/
Related Documents¶
- Backup & Recovery Plan (Tech-Pub) — strategy, scenarios, archive overview
- Data Retention Policy (Tech-Pub) — retention periods
- WI-002: Archival Process — moving files to archive
Version History¶
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | 2026-02-10 | Maya (default agent) | Initial work instruction |