Skip to content

Commit fc37f11

Browse files
feat(mdb): index migration (#5206)
1 parent f8c08cc commit fc37f11

File tree

4 files changed

+101
-0
lines changed

4 files changed

+101
-0
lines changed

menu/navigation.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,11 +2426,25 @@
24262426
"label": "How to",
24272427
"slug": "how-to"
24282428
},
2429+
{
2430+
"items": [
2431+
{
2432+
"label": "Migrating to Managed MongoDB®",
2433+
"slug": "migrating-to-managed-mongodb"
2434+
}
2435+
],
2436+
"label": "Additional Content",
2437+
"slug": "additional-content"
2438+
},
24292439
{
24302440
"items": [
24312441
{
24322442
"label": "Back up and restore MongoDB® Databases",
24332443
"slug": "backup-and-restore"
2444+
},
2445+
{
2446+
"label": "Migrating data with mongosync",
2447+
"slug": "cluster-to-cluster-sync"
24342448
}
24352449
],
24362450
"label": "API/CLI",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
meta:
3+
title: Managed MongoDB® - Additional Content
4+
description: Managed MongoDB® Additional Content
5+
content:
6+
h1: Managed MongoDB® - Additional Content
7+
paragraph: Managed MongoDB® Additional Content
8+
---
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
meta:
3+
title: Migrating to Scaleway Managed MongoDB®
4+
description: Learn how to migrate your MongoDB® databases to Scaleway Managed MongoDB® for improved performance and scalability
5+
content:
6+
h1: Migrating to Scaleway Managed MongoDB®
7+
paragraph: Discover the benefits of migrating your MongoDB® databases to Scaleway Managed MongoDB® and get step-by-step guidance on the migration process
8+
tags: databases mongodb migration managed-databases
9+
dates:
10+
validation: 2025-06-26
11+
categories:
12+
- managed-databases
13+
- mongodb
14+
---
15+
16+
Scaleway Managed MongoDB® allows you to run your Database Instances without setting up or managing infrastructure. Scaleway is responsible for implementing and maintaining features that improve the performance, scalability and security of your Database Instances.
17+
18+
If you have a self-managed MongoDB®, or you if use a different cloud provider, you can easily migrate your databases to Scaleway.
19+
20+
The migration processes described below are defined by the expected downtime. You can select the right option for your use case, depending on your downtime tolerance.
21+
22+
| Downtime tolerance | Recommended migration method | Benefits |
23+
| --- | --- | --- |
24+
| Can afford downtime | [Classic mongodump/mongorestore workflow](/managed-mongodb-databases/api-cli/backup-and-restore/) | Easy, straightforward |
25+
| Cannot afford downtime | [MongoDB® Cluster-to-Cluster sync tool](/managed-mongodb-databases/api-cli/cluster-to-cluster-sync) (`mongosync` binary) | Zero downtime, real-time data sync, flexible migration windows, easy rollback. Refer to the official PostgreSQL documentation for a list of the tool's [limitations](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/reference/limitations/#std-label-c2c-limitationsl) |
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
meta:
3+
title: Migrating data with mongosync
4+
description: This page shows you how to migrate data using MongoDB®'s Cluster-to-Cluster tool
5+
content:
6+
h1: Migrating data with mongosync
7+
paragraph: This page provides a guide on how to migrate data using MongoDB®'s Cluster-to-Cluster tool
8+
tags: databases mongodb migration mongosync data-synchronization
9+
dates:
10+
validation: 2025-06-30
11+
posted: 2025-06-30
12+
categories:
13+
- managed-databases
14+
- mongodb
15+
---
16+
17+
Scaleway Managed MongoDB® is compatible with the [MongoDB® Cluster-to-Cluster tool](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#std-label-c2c-quickstart).
18+
19+
Cluster-to-Cluster sync helps you migrate data from one cluster to another without downtime through synchronization. Until the sync is finalized, the tool replicates and writes data from one cluster to another.
20+
21+
22+
<Message type="important">
23+
Refer to the official PostgreSQL documentation for a list of Cluster-to-Cluster sync's [limitations](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/reference/limitations/#std-label-c2c-limitationsl)
24+
</Message>
25+
26+
<Macro id="requirements" />
27+
28+
- A Scaleway account logged into the [console](https://console.scaleway.com)
29+
- A [MongoDB® Database Instance](/managed-mongodb-databases/how-to/create-a-database-instance/)
30+
- Installed a [MongoDB®-compatible client](https://www.mongodb.com/try/download/shell)
31+
- Set up your [environment variables](/scaleway-cli/reference-content/environment-variables/#reserved-environment-variables) for the Scaleway API
32+
33+
1. Create a user in your MongoDB® Instance. Make sure you replace `<user-name>`, `<password>` and `{instance_id}` with the user name of the user, its password and the MongoDB® Instance UUID, respectively.
34+
35+
```
36+
curl -X POST \
37+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
38+
-H "Content-Type: application/json" \
39+
-d '{"name":"<user-name>","password":"<password>"}' \
40+
"https://api.scaleway.com/mongodb/v1/regions/fr-par/instances/{instance_id}/users"
41+
```
42+
43+
2. [Apply the `sync` role to the user](/managed-mongodb-databases/how-to/manage-users/#how-to-apply-a-role-to-a-user) for any database. The `db_admin`role also allows you to sync.
44+
3. [Download and install `mongosync` for your host system](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#download-and-install-mongosync).
45+
46+
<Message type="tip">
47+
If the database you want to sync is bigger than 100 GB, we recommend you use a [Scaleway Instance](/instances/how-to/create-an-instance) to sync.
48+
</Message>
49+
50+
3. [Connect the clusters](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#connect-the-clusters).
51+
52+
4. [Migrate data between clusters](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#migrate-data-between-clusters).
53+
54+
5. [Finalize the cut-over process](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#finalize-cutover-process).

0 commit comments

Comments
 (0)