✓ Verified 💻 Development ✓ Enhanced Data

Git Crypt Backup

Backup Clawdbot workspace and config to GitHub.

Rating
3.9 (241 reviews)
Downloads
1,364 downloads
Version
1.0.0

Overview

Backup Clawdbot workspace and config to GitHub.

Complete Documentation

View Source →

Git-Crypt Backup

Automated backup of Clawdbot workspace (~/clawd) and config (~/.clawdbot) to GitHub with sensitive files encrypted via git-crypt.

Setup

1. Create GitHub repos (private recommended)

bash
# Create two private repos on GitHub:
# - <username>/clawdbot-workspace
# - <username>/clawdbot-config

2. Initialize git-crypt

bash
# Install git-crypt
brew install git-crypt  # macOS
# apt install git-crypt  # Linux

# Workspace repo
cd ~/clawd
git init
git-crypt init
git remote add origin [email protected]:<username>/clawdbot-workspace.git

# Config repo
cd ~/.clawdbot
git init
git-crypt init
git remote add origin [email protected]:<username>/clawdbot-config.git

3. Configure encryption

Workspace .gitattributes:

text
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

Config .gitattributes:

text
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

Config .gitignore:

text
*.bak
*.bak.*
.DS_Store
logs/
media/
browser/
subagents/
memory/
update-check.json
*.lock

4. Export keys (important!)

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

⚠️ Store these keys securely (1Password, iCloud Keychain, USB drive, etc.)

5. Initial commit & push

bash
cd ~/clawd && git add -A && git commit -m "Initial backup" && git push -u origin main
cd ~/.clawdbot && git add -A && git commit -m "Initial backup" && git push -u origin main

Daily Backup

Run scripts/backup.sh:

bash
~/clawd/skills/git-crypt-backup/scripts/backup.sh

Or set up a cron job for automatic daily backups.

Restore on New Machine

bash
# 1. Clone repos
git clone [email protected]:<username>/clawdbot-workspace.git ~/clawd
git clone [email protected]:<username>/clawdbot-config.git ~/.clawdbot

# 2. Unlock with keys
cd ~/clawd && git-crypt unlock /path/to/workspace.key
cd ~/.clawdbot && git-crypt unlock /path/to/config.key

What Gets Encrypted

RepoEncryptedPlain
workspaceSOUL/USER/HEARTBEAT/MEMORY.md, memory/AGENTS.md, IDENTITY.md, TOOLS.md, drafts/
configclawdbot.json, .env, credentials/, sessions/cron/jobs.json, settings/

Installation

Terminal bash

openclaw install git-crypt-backup
    
Copied!

💻Code Examples

git remote add origin [email protected]:<username>/clawdbot-config.git

git-remote-add-origin-gitgithubcomusernameclawdbot-configgit.txt
### 3. Configure encryption

**Workspace `.gitattributes`:**

cd ~/.clawdbot && git-crypt export-key ~/clawdbot-keys/config.key

cd-clawdbot--git-crypt-export-key-clawdbot-keysconfigkey.txt
⚠️ **Store these keys securely** (1Password, iCloud Keychain, USB drive, etc.)

### 5. Initial commit & push

cd ~/.clawdbot && git add -A && git commit -m "Initial backup" && git push -u origin main

cd-clawdbot--git-add--a--git-commit--m-initial-backup--git-push--u-origin-main.txt
## Daily Backup

Run `scripts/backup.sh`:

~/clawd/skills/git-crypt-backup/scripts/backup.sh

clawdskillsgit-crypt-backupscriptsbackupsh.txt
Or set up a cron job for automatic daily backups.

## Restore on New Machine
example.sh
# Create two private repos on GitHub:
# - <username>/clawdbot-workspace
# - <username>/clawdbot-config
example.sh
# Install git-crypt
brew install git-crypt  # macOS
# apt install git-crypt  # Linux

# Workspace repo
cd ~/clawd
git init
git-crypt init
git remote add origin [email protected]:<username>/clawdbot-workspace.git

# Config repo
cd ~/.clawdbot
git init
git-crypt init
git remote add origin [email protected]:<username>/clawdbot-config.git
example.txt
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
example.txt
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
example.txt
*.bak
*.bak.*
.DS_Store
logs/
media/
browser/
subagents/
memory/
update-check.json
*.lock
example.sh
mkdir -p ~/clawdbot-keys
cd ~/clawd && git-crypt export-key ~/clawdbot-keys/workspace.key
cd ~/.clawdbot && git-crypt export-key ~/clawdbot-keys/config.key

Tags

#git_and-github #bot #github #git

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author louzhixian
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install git-crypt-backup