| name | backup-manager |
| description | Agents should invoke this skill for backup health checks, restore testing, NAS/Gitea backup integrity, 3-2-1 strategy review, backup script audits, or verifying repositories and archives can be restored safely. |
Backup Manager
Verify, test, and manage backups across the infrastructure.
Quick Start
Verify a Git Backup
TEMP_DIR=$(mktemp -d)
git clone --bare <repo-url> "$TEMP_DIR/test-repo" 2>&1
cd "$TEMP_DIR/test-repo"
git fsck --full --no-dangling
echo "Exit code: $?"
rm -rf "$TEMP_DIR"
Check Gitea Backup Status
curl -s "http://<gitea-host>:3000/api/v1/user/repos" \
-H "Authorization: token <token>" | jq '.[].name'
curl -s "http://<gitea-host>:3000/api/v1/repos/<owner>/<repo>" \
-H "Authorization: token <token>" | jq '.updated_at'
Backup Verification
Git Repository Integrity
git fsck --full --no-dangling
git fsck --strict
git rev-list --all --objects | wc -l
Expected: Exit code 0, no errors. Any "broken link", "missing", or "corrupt" messages indicate problems.
File Count Verification
find /path/to/source -type f | wc -l
find /path/to/backup -type f | wc -l
Backup Freshness
A backup is only useful if it's recent enough. Check age:
git log -1 --format="%ci"
find /path/to/backup -type f -printf '%T@\n' | sort -n | tail -1 | xargs -I{} date -d @{}
Freshness criteria:
- < 24h: Fresh
- 24h–72h: Acceptable (check if auto-backup is running)
-
72h: Stale (investigate why backups stopped)
Restore Testing
Git Restore Test
Full restore test to verify disaster recovery:
TEST_DIR=$(mktemp -d)
echo "Testing restore in: $TEST_DIR"
git clone <backup-repo-url> "$TEST_DIR/restored" 2>&1
cd "$TEST_DIR/restored"
git fsck --full
for f in AGENTS.md APPEND_SYSTEM.md MEMORY.md; do
if [ -f "$f" ]; then
echo "OK: $f exists"
else
echo "MISSING: $f"
fi
done
echo "Total files: $(find . -type f | wc -l)"
rm -rf "$TEST_DIR"
NAS Restore Test
ssh -p <ssh-port> <nas-user>@<nas-host> "ls <backup-path>/" 2>&1
ssh -p <ssh-port> <nas-user>@<nas-host> "find <backup-path> -type f | shuf | head -5 | xargs md5sum"
ssh -p <ssh-port> <nas-user>@<nas-host> "df -h /Volume1/"
3-2-1 Backup Strategy
The gold standard: 3 copies of data, on 2 different media types, with 1 offsite.
Current Status Assessment
| Requirement | Status | Details |
|---|
| Copy 1: Primary | Local machine | Working directory |
| Copy 2: Local backup | Gitea/NAS/local backup target | Auto-backup on a defined schedule |
| Copy 3: Offsite | GitHub | Mirror (if configured) |
| 2 media types | SSD + NAS | Different physical devices |
| 1 offsite | GitHub/cloud | Internet-accessible backup |
Recommendations
When evaluating backup strategy, check:
- Auto-backup running? — Verify
git-autobackup skill is active
- Gitea mirror healthy? — Check
github-mirror-check skill
- NAS sync active? — Verify OneDrive sync to NAS
- Recovery time objective (RTO)? — How fast can we restore?
- Recovery point objective (RPO)? — How much data can we afford to lose?
Gitea Backup Operations
Verify Auto-Backup
cd /path/to/workspace
git log --remotes=gitea -1 --format="%ci %s"
curl -s "http://<gitea-host>:3000/api/v1/repos/<owner>/<repo>" \
-H "Authorization: token <token>" | jq '.updated_at'
Manual Backup Trigger
git push gitea --all
git push gitea --tags
Backup Health Report Format
When delivering a backup status report:
- Summary — Overall backup health (Healthy / At Risk / Critical)
- Freshness — Last backup time for each target
- Integrity — Results of
git fsck or file verification
- 3-2-1 Compliance — Which requirements are met
- Recommendations — Any actions needed
Alert Conditions
Alert when:
- Backup is older than 72 hours (auto-backup may have failed)
git fsck reports any errors (corruption detected)
- Gitea API is unreachable (backup target down)
- NAS is unreachable (secondary backup target down)
- 3-2-1 compliance drops below 2 copies
Kai skill — Backup verification and strategy management