Install
openclaw skills install openclaw-backup-guideAutomates hourly OpenClaw workspace backups with SQLite database export, optional NAS sync via rsync, and GitHub version control commits and pushes.
openclaw skills install openclaw-backup-guideAutomated backup system for OpenClaw workspaces with database, NAS, and GitHub integration.
This skill provides automated hourly backups:
Perfect for maintaining workspace continuity and disaster recovery.
Edit backup-nas.sh to set your NAS mount point:
NAS_PATH="/path/to/your/nas/backup"
If you don't use NAS, the script will skip that step gracefully.
Add to your crontab for hourly backups:
0 * * * * cd /path/to/workspace && node scripts/backup-db.js; bash scripts/backup-nas.sh; git add -A && git commit -m "Hourly backup: $(date '+%Y-%m-%d %H:%M %Z')" && git push origin main
OR use OpenClaw's built-in cron:
openclaw cron add --schedule "0 * * * *" --task "Hourly workspace backup" --command "cd /path/to/workspace && node scripts/backup-db.js && bash scripts/backup-nas.sh && git add -A && git commit -m 'Auto backup' && git push"
Ensure you have:
git remote -vcd /path/to/your/workspace
node backup-db.js
bash backup-nas.sh
git add -A && git commit -m "Manual backup" && git push
# Check last backup commit
git log --oneline -1
# Check database backup
ls -lh workspace.db*
# Check NAS sync
ls -lh /your/nas/path/
backup-db.js - Node.js script for database backupbackup-nas.sh - Bash script for NAS rsyncskill.json - Skill metadataSKILL.md - This file (usage guide)README.md - OverviewEdit the cron schedule:
0 * * * **/30 * * * *0 */6 * * *0 3 * * *Extend backup-db.js with additional backup targets:
// Add S3 sync, Dropbox upload, etc.
To limit backup history in Git:
# Squash old commits periodically
git rebase -i HEAD~100
Backup not running:
tail -f /var/log/cronchmod +x backup-nas.shGit push fails:
ssh -T git@github.comgit remote -vNAS sync issues:
rsync -av /source /destinationmount | grep nasMIT - Use freely, modify as needed.
Created by Lance (lancelot3777) for OpenClaw workspace management.