Migrating data with mongosync
Scaleway Managed MongoDB® is compatible with the MongoDB® Cluster-to-Cluster tool (External link).
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.
Before you start
To complete the following actions, you must have:
- A Scaleway account logged into the console (External link)
- A MongoDB® Database Instance
- Installed a MongoDB®-compatible client (External link)
- Set up your environment variables for the Scaleway API
-
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.Copycurl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"<user-name>","password":"<password>"}' \ "https://api.scaleway.com/mongodb/v1/regions/fr-par/instances/{instance_id}/users" -
Apply the
syncrole to the user for any database. Thedb_adminrole also allows you to sync. -
Download and install
mongosyncfor your host system (External link).
Still need help?Create a support ticket