backup-openclaw-config
Backup and restore OpenClaw configuration files. Use when backing up OpenClaw settings before upgrades, transferring configuration to another machine, restoring from a previous backup, or preparing for system maintenance.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/alexjunanjing-2/backup-openclaw-configBackup OpenClaw Configuration
Overview
This skill provides automated backup and restore functionality for all OpenClaw configuration files. It creates timestamped archives containing your complete OpenClaw setup, including main configuration, workspace, skills, and user data.
What gets backed up:
~/.openclaw/- Main configuration~/.config/openclaw/- System-level configuration~/.local/share/openclaw/- Local data~/.openclaw/workspace/- Workspace, skills, and memory
Quick Start
Backup Your Configuration
Run the backup script:
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh [output-directory]
Example:
# Backup to default location ($HOME/backups/openclaw)
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh
# Backup to custom location
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh ~/my-backups
Output:
- Creates
openclaw_backup_YYYYMMDD_HHMMSS.tar.gzarchive - Creates
openclaw_backup_YYYYMMDD_HHMMSS.infometadata file - Shows backup summary with file list and archive size
- Automatically deletes backups older than 15 days to manage disk space
Restore from Backup
Run the restore script:
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/restore_openclaw.sh <backup-archive.tar.gz>
Example:
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/restore_openclaw.sh \
~/backups/openclaw/openclaw_backup_20260306_095000.tar.gz
Process:
- Shows backup information from .info file
- Lists all files that will be restored
- Requires confirmation before proceeding
- Backs up existing files with .bak extension
- Restores configuration to original locations
After restore:
# Restart OpenClaw Gateway to apply changes
systemctl --user restart openclaw-gateway
Workflow
Backup Workflow
-
Check prerequisites
- Verify backup directory exists or can be created
- Check if OpenClaw directories exist
-
Create backup structure
- Generate timestamp for unique backup name
- Create temporary directory for staging
-
Copy configuration files
- Backup
~/.openclaw/(main config) - Backup
~/.config/openclaw/(system config) - Backup
~/.local/share/openclaw/(local data) - Skip directories that don't exist (with warning)
- Backup
-
Create archive
- Compress all files into
.tar.gzarchive - Create
.infofile with metadata (timestamp, hostname, user, size)
- Compress all files into
-
Report results
- Show archive location and size
- Display restore command
- Warn if any directories were missing
Restore Workflow
- Validate backup
- Check if archive file exists
- Display backup information from .info file
- List contents of archive
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-alexjunanjing-2-backup-openclaw-config": {
"enabled": true,
"auto_update": true
}
}
}