gitclaw-backup
13
总安装量
13
周安装量
#25234
全站排名
安装命令
npx skills add https://github.com/blessonism/openclaw-skills --skill gitclaw-backup
Agent 安装分布
cursor
12
opencode
12
openclaw
11
github-copilot
11
codex
11
gemini-cli
11
Skill 文档
GitClaw Backup
Full backup of /home/node/.openclaw/ to GitHub via git.
Quick Reference
- Repo:
https://github.com/blessonism/openclaw-backup.git - Branch:
main - Script:
/home/node/.openclaw/gitclaw/auto_backup.sh - Cron:
daily-workspace-backupâ æ¯å¤© UTC 16:00 (å京æ¶é´ 0:00) - Exclude rules:
/home/node/.openclaw/.gitignore
Manual Sync
Run the backup script directly:
bash /home/node/.openclaw/gitclaw/auto_backup.sh
Script behavior:
- Lock-based (prevents concurrent runs)
- Stages all changes (
git add -A), respects.gitignore - Skips commit if no changes
- Pushes to
origin main - Logs to
/home/node/.openclaw/gitclaw/backup.log
Post-Sync Response
After a successful sync, always include a clickable link to the latest commit in your reply:
# Get the latest commit short hash
cd /home/node/.openclaw && git log --oneline -1
Then format the response like:
â 忥宿 â æ¥ç commit
- If no changes were detected, report “æ åæ´ï¼è·³è¿” (no link needed).
- If the push failed, report the error and suggest troubleshooting steps.
Check Status
# Last backup log
tail -5 /home/node/.openclaw/gitclaw/backup.log
# Git status (uncommitted changes)
cd /home/node/.openclaw && git status --short
# Recent commits
cd /home/node/.openclaw && git log --oneline -5
Exclude Files from Backup
Edit /home/node/.openclaw/.gitignore â standard gitignore syntax.
Current notable exclusions: workspace/images/, workspace/node_modules/, workspace/.micromamba/, workspace/bin/, large binary files.
Troubleshooting
- “already running” in log â stale lock at
/home/node/.openclaw/gitclaw/lock/, remove it:rmdir /home/node/.openclaw/gitclaw/lock - Push rejected â likely force-push or diverged history on remote; check with
git log --oneline -5 origin/main - Auth failure â credentials in
~/.git-credentials; verify withgit credential fill <<< "host=github.com"