Skip to content

Commit 10dba3d

Browse files
fix(mdb): migration pt3
1 parent 99c33ad commit 10dba3d

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

menu/navigation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,10 @@
24292429
{
24302430
"label": "Back up and restore MongoDB® Databases",
24312431
"slug": "backup-and-restore"
2432+
},
2433+
{
2434+
"label": "Migrating data with mongosync",
2435+
"slug": "cluster-to-cluster-sync"
24322436
}
24332437
],
24342438
"label": "API/CLI",

pages/managed-mongodb-databases/additional-content/migrating-to-managed-mongodb.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ The migration processes described below are defined by the expected downtime. Yo
2222
| Downtime tolerance | Recommended migration method | Benefits |
2323
| --- | --- | --- |
2424
| 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 (`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) |
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: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
categories:
10+
- managed-databases
11+
- mongodb
12+
---
13+
14+
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).
15+
16+
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.
17+
18+
19+
<Message type="important">
20+
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)
21+
</Message>
22+
23+
<Macro id="requirements" />
24+
25+
- A Scaleway account logged into the [console](https://console.scaleway.com)
26+
- A [MongoDB® Database Instance](/managed-mongodb-databases/how-to/create-a-database-instance/)
27+
- Installed a [MongoDB®-compatible client](https://www.mongodb.com/try/download/shell)
28+
- Set up your [environment variables](/scaleway-cli/reference-content/environment-variables/#reserved-environment-variables) for the Scaleway API
29+
30+
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.
31+
32+
```
33+
curl -X POST \
34+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
35+
-H "Content-Type: application/json" \
36+
-d '{"name":"<user-name>","password":"<password>"}' \
37+
"https://api.scaleway.com/mongodb/v1/regions/fr-par/instances/{instance_id}/users"
38+
```
39+
40+
2. [Apply the `sync` role to the user](/managed-mongodb-databases/how-to/manage-users/#how-to-apply-a-role-to-a-user). The `db_admin`role also allows you to sync.
41+
3. [Download and install `mongosync` for your host system](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#download-and-install-mongosync).
42+
43+
<Message type="tip">
44+
If the database you want to sync is bigger than 100GB, we recommend you use a [Scaleway Instance](/instances/how-to/create-an-instance) to sync.
45+
</Message>
46+
```
47+
3. [Connect the clusters](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#connect-the-clusters).
48+
49+
4. [Migrate data between clusters](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#migrate-data-between-clusters).
50+
51+
5. [Finalize the cut-over process](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/quickstart/#finalize-cutover-process).
52+
53+
54+
55+
56+
57+
58+

0 commit comments

Comments
 (0)