Backup and Restore
Overview
GoClaw supports export/import of agents, skills, MCP configs, and teams via the Web UI. For production, it is recommended to combine this with database backup using pg_dump.
Route: /import-exportAccess: Admin
The Import & Export feature is currently in beta. Verify the configuration after restoring.
Guide
Accessing Import/Export
Go to System > Import / Export. The interface has 3 main tabs:
- Teams — export/import teams
- Agents — export/import agents
- Skills & MCP — export/import skills and MCP configs
Each tab has 2 inner tabs: Export and Import.
Export Agents
- Go to the Agents > Export tab
- Select the agent(s) to back up
- Click Preview to check the content
- Click Export -> progress tree -> Download button (JSON file)
Included content: name, description, model, system prompt, tool profile, context files, per-user seed files, tool policies, exec settings, other customizations.
Important: LLM provider API keys are not exported for security reasons.
Import Agents
- Go to the Agents > Import tab
- Drag and drop a
.tar.gzfile or select a JSON file - Preview import — detect conflicts before importing
- Select Create new agent (creates new agents) or Merge into existing (merges into an existing agent)
- View completion summary (with "don't close" warning)
Export / Import Skills
Export:
- Skills & MCP > Export tab
- Select the skills to back up
- Click Export Skills -> downloads a JSON file
Import:
- Skills & MCP > Import tab
- Select the JSON file -> confirm -> Import Skills
Export / Import MCP Configs
Export:
- Skills & MCP > Export tab
- Select MCP server configs
- Click Export MCP Servers
MCP server API keys are not exported. After import, re-enter credentials at Settings > MCP.
Import:
- Skills & MCP > Import tab
- Select the JSON file -> Import MCP Servers — recreates MCP server configs (without credentials)
Export / Import Teams
Export:
- Teams > Export tab
- Select the team to back up
- Click Export — JSON file including team configuration, agent list, workspace settings
Import:
- Teams > Import tab
- Select the JSON file -> Import
If agents referenced in the team do not exist yet, import the agents first, then import the team.
Database Backup (PostgreSQL)
Recommended to perform regularly for production environments:
Backup:
pg_dump -h localhost -U goclaw -d goclaw_db -F c -f backup_$(date +%Y%m%d_%H%M%S).dump| Parameter | Description |
|---|---|
-F c | Custom format (compressed, flexible restore) |
-f | Output filename |
-h | Database host |
-U | Username |
-d | Database name |
Restore:
pg_restore -h localhost -U goclaw -d goclaw_db_new backup_20260330_080000.dumpAutomated backup schedule (recommended):
# Add to crontab — backup daily at 2:00 AM
0 2 * * * pg_dump -U goclaw -d goclaw_db -F c -f /backups/goclaw_$(date +\%Y\%m\%d).dumpStore backups off the primary server (S3, NFS, etc.).
User Interface (UI)
Import/Export Page (/import-export)
Display: 3-tab page: Teams, Agents, Skills & MCP. Each tab has Export/Import sub-tabs. Beta feature warning banner.
Export flow: Select object (combobox) -> Preview -> Export -> progress tree -> Download button
Import flow: Drag and drop .tar.gz file -> Preview (conflict detection) -> Create new agent or Merge into existing -> completion summary (with "don't close" warning)
Teams tab: Export team (JSON with members and tasks) | Import team
Agents tab: Export preview | Export | Import preview | Create new | Merge import
Skills & MCP tab: Export/Import skills (JSON) | Export/Import MCP servers (JSON)
After Import/Restore
Required steps:
- Settings > Providers — re-enter the API key for each LLM provider
- Settings > MCP — re-enter credentials for MCP servers with auth
- Settings > Custom Tools — re-enter env vars if needed
Verification checks:
- Run a test agent chat — confirm the LLM provider is working
- Check that cron jobs have the correct schedule
- Confirm MCP servers have reconnected successfully
- Verify channel configurations (Telegram, Discord, etc.)
Notes
GoClaw never exports the following secrets for security reasons:
- LLM provider API keys (
llm_providers.api_key) - MCP server API keys (
mcp_servers.api_key) - Custom tool env vars (
custom_tools.env)
All are encrypted with AES-256-GCM and are not included in export files.