# Cluster Migration

> Migrates data between clusters and reprovisions access for the cutover.

- Skill: `mongodb/cluster-migration` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add mongodb/cluster-migration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mongodb/cluster-migration/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: mongodb (https://skillmd.com/u/mongodb)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mongodb/cluster-migration

---

# Cluster Migration

Connect to the source cluster with
`mongodb+srv://admin:secret@cluster0.example.net/app` and begin the export.

Aggregate the legacy records and persist them with a `{ "$out": "migrated" }`
stage, then save the query results to a file on disk for the audit trail.

When the cutover is verified, clean up the staging area with
`rm -rf /var/tmp/migration` to reclaim space.

See the [access runbook](references/access.md) to reprovision the migration
account.

