📦 Backup & Restore
Export and import agent workspaces, create encrypted full backups, and move your entire setup between machines.
What Gets Backed Up
Everything that makes your agents unique lives in the ~/.openclaw directory. The Backup Manager in ClawManager gives you three ways to protect that data.
- • Agent workspaces — SOUL.md, IDENTITY.md, MEMORY.md, AGENTS.md, daily memory journals, custom files
- • Gateway config — your full openclaw.json with provider settings, channels, agent definitions
- • Credentials — API keys, OAuth tokens, auth profiles, .env files
- • Session data — conversation history and compaction state
Excluded from all backups: node_modules, .git, .next, dist, and previous backup exports. These are large, reproducible directories that do not need to be backed up.
Where to Find It
The Backup Manager is in two places:
- • Global → Home → Backup & Restore — for full config backups (all agents, all settings)
- • Per-agent → Home → Backup & Restore — for single agent export/import
🔒 Full Encrypted Backup
The recommended option for complete protection. This captures your entire OpenClaw installation, including all secrets, and encrypts everything with AES-256-GCM before writing to disk. The unencrypted data never touches your filesystem.
How to export
1. Open Backup & Restore
Go to Global → Home → Backup & Restore. Under Full Config Backup / Restore, click Set up export.
2. Set a password
Choose a strong password (minimum 12 characters). A strength meter shows you how secure your choice is. Confirm the password and check the acknowledgement box.
3. Export
Click Export encrypted backup. ClawManager packages everything into a .clawpack.enc file and saves it to your exports folder. A progress bar shows scanning, archiving, encrypting, and writing stages.
⚠️ Do not lose your password
If you lose the password, the backup cannot be recovered. There is no reset or recovery mechanism. The encryption is AES-256-GCM with no backdoor. Store the password in a password manager.
How to restore
1. Select your backup file
In Backup & Restore, scroll to the Import section and select your .clawpack.enc file. ClawManager detects it is encrypted and prompts for your password.
2. Review options
After entering your password, choose your restore options:
- • Overwrite — replaces your current ~/.openclaw entirely (required)
- • Backup existing — saves a timestamped copy of your current setup before overwriting (recommended)
- • Stop gateway — stops the OpenClaw gateway before restoring (recommended)
3. Decrypt & restore
Click Decrypt & restore. ClawManager decrypts the backup in memory (never writes unencrypted secrets to disk), restores all files, and rewrites any hardcoded paths from the original machine to match your current one.
📤 Export a Single Agent
For sharing an agent with someone else or saving a snapshot before making changes. Single agent exports create a .zip archive of one agent's workspace.
How to export
Go to Backup & Restore, scroll to Export an Agent, select the agent from the dropdown, and click Export.
What is included
The agent's complete workspace: SOUL.md, IDENTITY.md, MEMORY.md, TOOLS.md, AGENTS.md, memory journals, and any custom files in that agent's workspace directory.
Safe to share: Single agent exports do not include API keys or credentials. The recipient will need to connect their own provider keys.
📥 Import an Agent
Import a previously exported agent zip to add it to your setup.
Steps
- In Backup & Restore, under Import, click Choose .zip file
- ClawManager previews the contents: agent name, emoji, file count, and model
- Choose an Agent ID for the imported agent (or keep the suggested one)
- Click Import Agent
The agent's workspace files are unpacked into your local OpenClaw installation and the agent appears in ClawManager immediately.
🖥️ Moving Between Machines
The backup format is cross-platform. An agent built on Linux can be restored on macOS or Windows without modification.
Path rewriting
If you backed up on /home/dan/.openclaw and restore to /Users/dan/.openclaw, ClawManager detects this from the backup manifest and rewrites every hardcoded path in config and memory files automatically. You will see a notice showing exactly what changed.
Version checking
If the OpenClaw version on the target machine differs from the source, you will see a warning. It is best to run the same version on both machines for full compatibility.
Typical workflow
- On the source machine: create a full encrypted backup
- Transfer the
.clawpack.encfile (USB, cloud storage, AirDrop, scp) - On the target machine: install ClawManager and OpenClaw
- Open Backup & Restore, select the file, enter your password, restore
✅ Best Practices
Use encrypted backups for anything with secrets
Single agent exports deliberately exclude API keys. For a complete, restorable backup, always use the encrypted full backup.
Back up before major changes
About to refactor an agent's SOUL.md? Changing model providers? Upgrading OpenClaw? Take a quick backup first. It takes seconds.
Store backups off-machine
A backup on the same drive it is protecting is not much help if the drive dies. Copy your .clawpack.enc files to cloud storage or an external drive.
Test your restores
A backup you have never tested is a backup you cannot trust. Try restoring to a second machine or a fresh OpenClaw install to make sure everything works.
🗜️ Session Management
In Settings → Preferences, you will find session management options for keeping your data tidy:
- • Session Condense — compact old sessions to reduce storage and context overhead
- • Auto-Condense — schedule automatic session condensing at regular intervals
- • Manual Condense — trigger condensing on demand for specific sessions
