Migrating Data Using DRS
Prerequisites
To improve the stability and security of your migration ensure that your instances meet the migration requirements described in Migration Preparations.
Migration Types
- Full migration
This migration type is suitable for scenarios where some service interruptions are acceptable. All objects and data in non-system databases are migrated to the destination database in a single batch. The objects include tables, views, and stored procedures. If you perform a full migration, stop operations on the source database, or data generated in the source database during the migration will result in inconsistencies with the destination database.
- Full+Incremental migration
This migration type allows you to migrate data without interrupting services. After a full migration initializes the destination database, an incremental migration initiates and parses logs to ensure data consistency between the source and destination databases. If you select the Full+Incremental migration type, data generated during the full migration will be synchronized to the destination database with zero downtime, ensuring that both the source and destination databases remain accessible throughout the process.
Supported Source and Destination Databases
Source DB |
Destination DB |
---|---|
|
|
Supported Migration Objects
Different types of migration tasks support different migration objects. For details, see Table 2. DRS will automatically check the objects you selected before the migration.
Type |
Precautions |
---|---|
Migration objects |
|
Database Account Permission Requirements
To start a migration task, the source and destination database users must have permissions listed in the following table. Different types of migration tasks require different permissions. For details, see Table 3. DRS automatically checks the database account permissions in the pre-check phase and provides handling suggestions.
- You are advised to create an independent database account for DRS task connection to prevent task failures caused by database account password modification.
- After changing the account passwords for the source and destination databases, modify the connection information in the DRS task as soon as possible to prevent automatic retry after a task failure. Automatic retry will lock the database accounts.
Type |
Full migration |
Full+Incremental Migration |
---|---|---|
Source database user |
|
|
Destination database user |
The destination database user must have the dbAdminAnyDatabase permission for the admin database and the readWrite permission for the destination database. If the destination database is a cluster instance, the database user must have the clusterManager permission for the admin database. |
For example, the source database user must have the readAnyDatabase permission for the admin database and the read permission for the config database.
db.grantRolesToUser("Username",[{role:"readAnyDatabase",db:"admin"}, {role:"read",db:"config"}])
Migration Operations
For details, see MongoDB Database Migration in Data Replication Service Best Practices.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot