π¦ ClawHub
Backup 2 Github
by @fangbb-coder
Backup personalized OpenClaw configuration and user data to a GitHub repo with single-commit history and optional dry-run preview.
π‘ Examples
# Backup current configuration
python backup.py --action backupPreview what will be backed up (no push)
python backup.py --action backup --dry-runRestore from backup (overwrites existing files)
python backup.py --action restore
βοΈ Configuration
# Install dependencies
pip install -r requirements.txtConfigure (create .env file)
GITHUB_TOKEN=ghp_your_token_here
GITHUB_REPO=your-username/your-backup-repo
π Tips & Best Practices
Error: GITHUB_TOKEN not set
β Set token in .env or use --token flag.
Error: Repository not found
β Check GITHUB_REPO format: owner/repo.
File not backing up
β Ensure path is in BACKUP_FILES and not excluded by patterns.
TERMINAL
clawhub install backup-2-github