2.8 KiB
title, type, status, created, updated, verified_on, last_tested, confidence, tags, sources
| title | type | status | created | updated | verified_on | last_tested | confidence | tags | sources | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Backup Wiki | runbook | active | 2026-07-22 | 2026-10-20 | 2026-10-20 | 2026-10-20 | high |
|
Backup Wiki
Purpose
Create a durable backup of the wiki so recoverable copies exist before mutating changes.
Symptoms that match this runbook
- Before a big restructuring, page rewrite, or history migration
- Weekly or scheduled backup reminder
- Suspected accidental deletion or corruption
Prerequisites
- Wiki path:
/home/hermes/wiki - Git is available
- Backup destination is writable
Two trees, not one (verified 2026-10-20). This runbook still backs up
/home/hermes/wikionly — the Obsidian vault mirror, which is a local-only git repo with no remote (git remote -vis empty). The authoring tree that is actually pushed to Gitea (Anthony/agent-estate-wiki) lives at/home/hermes/workspace/agent-estate-wikiand is a separate repo. A tarball of/home/hermes/wikidoes not protect the authoring tree. To protect both, run step 3 against each path, or back up the authoring tree and rely on Gitea.Also note
/home/hermes/wiki-backups/does not yet exist — this runbook has never been run.
Procedure
1. Sanity-check repo state
cd /home/hermes/wiki && git status --short && git log --oneline -3
2. Commit any open changes first
cd /home/hermes/wiki
git add -A
git commit -m "backup-baseline: $(date +%Y-%m-%d)"
3. Export a timestamped copy outside the repo
BACKUP_DIR=/home/hermes/wiki-backups
mkdir -p "$BACKUP_DIR"
BACKUP="$BACKUP_DIR/wiki-$(date +%Y%m%d-%H%M%S).tar.gz"
tar -czf "$BACKUP" -C /home/hermes wiki
echo "Wrote $BACKUP"
4. Optional: push to a Git remote if configured
cd /home/hermes/wiki
git remote -v
git push --all
git push --tags
If no remote is configured, skip this step and rely on the tarball.
5. Rotate old backups if needed
Keep N most recent backups:
ls -1t "$BACKUP_DIR"/wiki-*.tar.gz | tail -n +6 | xargs -r rm
Verification
git status --shortshows a clean tree- Tarball exists and is non-empty:
stat "$BACKUP"
tar -tzf "$BACKUP" | head -20
Rollback
- Restore from tarball:
BACKUP=$(ls -1t /home/hermes/wiki-backups/wiki-*.tar.gz | head -1)
rm -rf /home/hermes/wiki-restore
mkdir -p /home/hermes/wiki-restore
tar -xzf "$BACKUP" -C /home/hermes wiki-restore --strip-components=1
- Verify restored content before replacing live wiki
Notes
- This runbook intentionally does not write secrets or token dumps into backups
- If you need a full Hermes config+data backup, use
hermes backupin addition to this wiki-only backup
Last tested
2026-07-22