Migrate a workspace
Migrate a workspace
Section titled “Migrate a workspace”When a project is renamed or moved to a new organization, you can update the org_id and workspace_id on every matching memory with eden_migrate. This guide shows how to preview and execute a scope remap.
Prerequisites
Section titled “Prerequisites”- eden-memory running as an MCP server.
- The current
org_idandworkspace_idvalues. - The new
org_idandworkspace_idvalues. - Optional: enough disk space for a backup copy if you set
backup: true.
1. Plan the remap
Section titled “1. Plan the remap”Decide which scope fields change. Common cases:
| From | To | Reason |
|---|---|---|
old-org |
new-org |
Company rebrand or acquisition. |
old-project |
new-project |
Repository rename. |
empty (org_empty) |
your-org |
Backfilling fleet scope on legacy memories. |
2. Run a dry-run preview
Section titled “2. Run a dry-run preview”eden_migrate defaults to dry-run. Call it first to see how many rows match without changing anything.
{ "from_org_id": "old-org", "from_workspace_id": "old-project", "to_org_id": "new-org", "to_workspace_id": "new-project"}Review the returned count and sample memory IDs. Make sure only the intended memories are affected.
3. Back up the database
Section titled “3. Back up the database”Before mutating, export an encrypted snapshot:
{ "path": "/home/yourname/backups/eden-memory-pre-migrate.bin", "passphrase": "a strong unique passphrase"}Or set backup: true in the migrate call to make a local copy first.
4. Execute the remap
Section titled “4. Execute the remap”Add confirm: true and dry_run: false to apply the change.
{ "from_org_id": "old-org", "from_workspace_id": "old-project", "to_org_id": "new-org", "to_workspace_id": "new-project", "backup": true, "confirm": true, "dry_run": false}backup: true copies the database before writing. The copy is placed next to the original with a timestamp suffix.
5. Verify the result
Section titled “5. Verify the result”Run a scoped recall with the new workspace:
{ "agent_id": "claude-code-cli", "user_id": "yourname", "org_id": "new-org", "workspace_id": "new-project", "query": "any known fact", "limit": 5}The memories should now appear under the new scope. A recall against the old scope should return nothing.
Expected outcome
Section titled “Expected outcome”- Dry-run reports the matching rows without changing them.
- The live remap updates
org_idand/orworkspace_idon every matching memory. - A backup exists if
backup: truewas used. - Recall under the new scope returns the migrated memories.