Migration Wizard Atlas ↔ Cosmos(双向)
公司从 Cosmos 迁出到 Atlas(昂贵/受限),或从 Atlas 迁入到 Cosmos(Azure-only 强制)。NoSqlStudio 是市场上唯一具有双向 wizard 的工具。自动 Translation matrix + estimates + 5 个 Cosmos 模式的账单预测 + features dropped 列表 + mongosh script 生成器 + 完整的 Discover → Translate → Create → Indexes → Copy → Verify stepper。
它在应用中的位置: Tools → Cosmos DB → Migration Wizard(Cosmos ↔ Atlas)
它做什么
- 方向选择器:Cosmos → Atlas | Atlas → Cosmos。
- 带现实默认值的 JSON 可编辑 collection plans。
- Estimates:数据大小 GB、collection 数量、index 数量、RU/s steady-state。
- 通过 Holt-Winters 合成的 5 个 Cosmos 模式(manual / autoscale / serverless / reserved 1y / 3y)的账单预测。
- Features dropped 列表:text index、compound > 4 paths、hashed-in-compound — 每行带说明。
- 按方向的 translation matrix(TTL、partition/shard、composite/compound、$search routing、transactions、stored procs)。
- 用于 createCollection + createIndex 的 mongosh script 生成器。
- 执行 stepper:Discover → Translate → Create target → Create indexes → Copy data → Verify。
分步
- 1
选择方向
Cosmos → Atlas(escape route)或 Atlas → Cosmos(entry)。Translation matrix 自动变化。
- 2
编辑 plan JSON
默认带 2 个示例 collections。调整为您的:每个 entry 有 ns、estDocCount、estAvgDocBytes、partitionKey(Cosmos 端)、indexes[]。
- 3
查看 estimates
数据大小 GB,Atlas→Cosmos 的估计 RU/s。在 migrate 之前 5 个模式的账单预测帮您决定。
- 4
审查 features dropped
Table 列出在 migration 中将丢失的 features + 推荐($search 本地 NoSqlStudio?Cosmos vCore?保留在 Atlas 上?)。
- 5
检查 translation matrix
TTL、partition vs shard key、composite vs compound、stored procs、transactions 等 — 每个带文本规则。
- 6
复制 mongosh script
"Copy script" 按钮 → 用于目标的 createCollection + createIndex 的完整命令。
- 7
运行 plan(preview)
Stepper 在 preview 中运行 Discover→Translate→Create→Indexes。Data copy 委托给 DB Copy workspace(Ctrl+Alt+P)— 想在那里继续以获得 progress bar。
真实用例
从 Cosmos 退出到 Atlas
公司增长,达到 Cosmos 上限(无 text/wildcard/$search)。Migration Wizard:12 个 collections、47 个 indexes、380GB。通过 DB Copy 估计时间 4h。成功,每月节省 $2.4k + 启用 Atlas Search 功能。
从 Atlas 进入 Cosmos(监管)
医疗公司需要 Azure 数据驻留。Wizard 显示 $search 必须迁移到 NoSqlStudio 本地或 Cosmos vCore。决策:vCore。Migration 顺利。