2.1 KiB
2.1 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-07-22 | 2026-07-22 | 2026-07-22 | 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
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