Install
openclaw skills install backup-2-githubBackup personalized OpenClaw configuration and user data to a GitHub repo with single-commit history and optional dry-run preview.
openclaw skills install backup-2-githubOpenClaw skill to backup personalized configuration and user data to a GitHub repository. Ensures easy migration and disaster recovery.
This skill backs up files that are specific to your setup, excluding default OpenClaw installation files:
openclaw.json (TTS, skills, plugins settings)MEMORY.md (curated memories, learned context)USER.md, IDENTITY.md, SOUL.md (your profile & persona)TOOLS.md (camera names, SSH hosts, voice preferences, etc.)HEARTBEAT.md (periodic checklists)cron/jobs.json (your cron task configuration)openclaw-monitor.cjs, monitor/*.cjs)backup.py to add paths)backup.py to add paths)credentials/*.json (Xiaohongshu cookies, etc.) - configurableAutomatically Excluded:
memory/YYYY-MM-DD.md) - too large/ephemeralcron/runs/).git, __pycache__, venv, node_modulesrepo scope)# Install dependencies
pip install -r requirements.txt
# Configure (create .env file)
GITHUB_TOKEN=ghp_your_token_here
GITHUB_REPO=your-username/your-backup-repo
# Backup current configuration
python backup.py --action backup
# Preview what will be backed up (no push)
python backup.py --action backup --dry-run
# Restore from backup (overwrites existing files)
python backup.py --action restore
backup.py → BACKUP_FILES)Edit BACKUP_FILES in backup.py to add or remove files from backup.
repo only).env (never commit)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.
MIT