Backup Clawdbot workspace and config to GitHub with git-crypt encryption. Use for daily automated backups or manual backup/restore operations.
将 Clawdbot 工作区(~/clawd)和配置(~/.clawdbot)自动备份到 GitHub,敏感文件通过 git-crypt 加密。
bash
bash
工作区 .gitattributes:
SOUL.md filter=git-crypt diff=git-crypt
USER.md filter=git-crypt diff=git-crypt
HEARTBEAT.md filter=git-crypt diff=git-crypt
MEMORY.md filter=git-crypt diff=git-crypt
memory/ filter=git-crypt diff=git-crypt
配置 .gitattributes:
clawdbot.json filter=git-crypt diff=git-crypt
.env filter=git-crypt diff=git-crypt
credentials/ filter=git-crypt diff=git-crypt
telegram/ filter=git-crypt diff=git-crypt
identity/ filter=git-crypt diff=git-crypt
agents//sessions/ filter=git-crypt diff=git-crypt
nodes/ filter=git-crypt diff=git-crypt
配置 .gitignore:
*.bak
.bak.
.DS_Store
logs/
media/
browser/
subagents/
memory/
update-check.json
*.lock
bash
mkdir -p ~/clawdbot-keys
cd ~/clawd && git-crypt export-key ~/clawdbot-keys/workspace.key
cd ~/.clawdbot && git-crypt export-key ~/clawdbot-keys/config.key
⚠️ 安全存储这些密钥(1Password、iCloud 钥匙串、U盘等)
bash
cd ~/clawd && git add -A && git commit -m 初始备份 && git push -u origin main
cd ~/.clawdbot && git add -A && git commit -m 初始备份 && git push -u origin main
运行 scripts/backup.sh:
bash
~/clawd/skills/git-crypt-backup/scripts/backup.sh
或设置 cron 任务实现自动每日备份。
bash
| 仓库 | 加密内容 | 明文内容 |
|---|---|---|
| 工作区 | SOUL/USER/HEARTBEAT/MEMORY.md, memory/ | AGENTS.md, IDENTITY.md, TOOLS.md, drafts/ |
| 配置 |
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 git-crypt-backup-1776384849 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 git-crypt-backup-1776384849 技能
skillhub install git-crypt-backup-1776384849
文件大小: 2.17 KB | 发布时间: 2026-4-17 15:00