Install
openclaw skills install claw-home-dir-backup-restoreBackup or restore your entire OpenClaw setup including config, agents, skills, credentials, and workspace as a timestamped portable .tar.gz archive.
openclaw skills install claw-home-dir-backup-restoreSnapshot and migrate your complete OpenClaw setup — config, agents, flows, skills, credentials, memory, and workspace — as a single portable archive.
~/.openclaw/ directory into a timestamped .tar.gz
(or .tar.gz.gpg if encrypted) — no files excluded.~/.openclaw/, preserving directory structure and
permissions, so OpenClaw works immediately after extraction.Use this skill when the user says:
The entire ~/.openclaw directory — every file and subdirectory — is included in the archive.
No exclusions. The restored machine gets an exact copy of the original, and OpenClaw works
immediately without any missing configuration, credentials, skills, or state.
See references/paths.md for details on sensitive paths and restore-time permissions.
OPENCLAW_HOME, defaults to ~/.openclaw).BACKUP_DIR, defaults to ~/openclaw-backups).~/.openclaw directory into a timestamped .tar.gz.--encrypt flag or BACKUP_GPG_RECIPIENT env var.~/.openclaw already exists and prompt for confirmation (or use --force)..gpg extension detected.~/.openclaw/ with --strip-components=0.credentials/, secrets/, identity/).Print all .tar.gz and .tar.gz.gpg files in BACKUP_DIR with size and date.
Run gzip -t on the archive and list its top-level contents without extracting.
| Script | Purpose |
|---|---|
scripts/backup.sh | Create a backup archive |
scripts/restore.sh | Restore from a backup archive |
# Create a backup in ~/openclaw-backups/
bash scripts/backup.sh
# Backup to a custom directory
bash scripts/backup.sh --output /Volumes/USB/backups
# Backup with GPG encryption
bash scripts/backup.sh --encrypt you@example.com
# List available backups
bash scripts/backup.sh --list
# Verify a backup without restoring
bash scripts/restore.sh --verify openclaw-backup-2026-05-24_120000.tar.gz
# Restore (will prompt before overwriting)
bash scripts/restore.sh openclaw-backup-2026-05-24_120000.tar.gz
# Restore without confirmation prompt
bash scripts/restore.sh --force openclaw-backup-2026-05-24_120000.tar.gz
# Restore to a custom openclaw home
bash scripts/restore.sh --home /opt/openclaw openclaw-backup-2026-05-24_120000.tar.gz
bash scripts/backup.sh — copy the .tar.gz to the new machine.bash scripts/restore.sh <archive>.credentials/ and secrets/ contain sensitive API keys. Keep backups in a secure location.--encrypt with a GPG key for backups stored in cloud storage or on shared drives.chmod 700 on sensitive directories automatically.~/.openclaw/ (path traversal check).identity/device-auth.json without informing the user it contains auth tokens.