Create a Migration Job
Migration jobs are the worker processes responsible for transferring your data and schemas from a relational database to MongoDB. Create a new migration job from the Data Migration tab.
This task also applies to Apache Kafka supported continuous migration jobs. There is no procedural difference introduced when using Kafka. For more details, see Integrating Relational Migrator with Kafka.
About this Task
The URI credentials you provide when creating a migration job do not need to be the same as the credentials used when creating your project.
You use an existing Relational Database Connection, or create one when you create the migration job.
Continuous migration jobs using Confluent Cloud Kafka may take additional time due to the provisioning of backend resources on Confluent Cloud. This process typically takes an additional two to five minutes the first time a CDC migration job runs.
You can recover a continuous migration job within 24 hours of failure. For details, see Recover a Migration Job.
Before you Begin
Create one or more mapping rules in your Relational Migrator project.
For both Atlas and on-premises deployments, create a separate MongoDB user for Relational Migrator with
readWrite
access to your MongoDB database.
Steps
Enter the relational database connection details
On the Connect to your source database form, enter the connection details to create the JDBC URI for your relational database.
To use a saved relational database connection, click Use a saved connection and select it from the drop-down, then enter credentials if required.
To create a new connection:
In the Database type drop-down, select the database type.
To enter a connection string directly, enable the Enter URI manually toggle and paste your connection string into the JDBC URI.
To create a connection string by entering database information, enter the following:
FieldValueHost
The host IP or DNS name.
Port
The port number.
Database
The database name. Required.
Identifier
One of Service Name or SID.
Username and Password
The credentials to use for authentication.
Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.
FieldValueHost
The host IP or DNS name.
Port
The port number.
Database
The database name. If blank, you only see objects in the default
dbo
schema in all databases.Authentication
By default, this is set to SQL Server. Set to Windows to enable Windows Integrated Authentication, using the credentials of the user who launched the Relational Migrator executable. This disables the Username and Password fields.
Username and Password
The credentials to use for authentication. Disabled if Authentication is set to Windows.
Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.
General / SSL toggle
View SSL settings for the connection.
To use SSL, you must first uncomment and update the
server.ssl
configuration properties in youruser.properties
file.SSL: Use SSL
Enable or disable SSL.
SSL: Trust server certificate
With SSL enabled, check this to trust the stored certificate. Leave unchecked to verify the server certificate against a trusted Certificate Authority.
FieldValueHost
The host IP or DNS name.
Port
The port number.
Database
The database name. Leave blank to load all databases.
Username and Password
The credentials to use for authentication.
Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.
General / SSL toggle
View SSL settings for the connection.
To use SSL, you must first uncomment and update the
server.ssl
configuration properties in youruser.properties
file.SSL: Use SSL
Enable or disable SSL.
SSL: SSL mode
With SSL enabled, choose from:
Preferred (default): Make an encrypted connection if possible, otherwise fall back to an unencrypted connection.
Required: Require an encrypted connection.
Verify CA: Verify the server certificate against a trusted Certificate Authority.
Verify identity: Verify the database connection information against the certificate contents.
FieldValueHost
The host IP or DNS name.
Port
The port number.
Database
The database name. Leave blank to connect to the default database.
Username and Password
The credentials to use for authentication.
Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.
General / SSL toggle
View SSL settings for the connection.
To use SSL, you must first uncomment and update the
server.ssl
configuration properties in youruser.properties
file.SSL: Use SSL
Enable or disable SSL.
SSL: SSL mode
With SSL enabled, choose from:
Prefer (default): Make an encrypted connection if possible, otherwise fall back to an unencrypted connection.
Require: Require an encrypted connection.
Verify CA: Verify the server certificate against a trusted Certificate Authority.
Verify full: Verify the database connection information against the certificate contents.
FieldValueHost
The host IP or DNS name.
Port
The port number.
Database
The database name. Required.
Username and Password
The credentials to use for authentication.
Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.
FieldValueHost
The host IP or DNS name.
Port
The port number.
Database
The database name. Leave blank to connect to the default database.
Username and Password
The credentials to use for authentication.
Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.
Enter a Connection name and optional Environment tag.
Click Connect.
The saved connection is available for use in all jobs and projects.
Enter MongoDB connection details
To use a saved MongoDB connection, click Use a saved connection and select it from the drop-down, then enter credentials if required.
To create a new connection:
Enter the MongoDB connection string.
In MongoDB connection string (URI), enter your MongoDB URI.
If it isn't included in the connection string, enter the Database to connect to.
If they aren't included in the connection string, enter the Username and Password of your Relational Migrator MongoDB user.
Enter a Connection name and optional Environment tag.
Click Connect.
The saved connection is available for use in all jobs and projects.
On the Migration Options form, select Migration Options:
Migration Option | Description |
---|---|
Mode | Defines the type of migration job. |
Drop destination collections before migration | Boolean. Indicates whether Relational Migrator drops a destination collection before transferring data. |
Stop after errors | Integer. Indicates the number of errors after which Relational Migrator stops the migration job. |
Verify migrated data | Boolean. If true, the sync engine checks the migrated data against the source database. Only supported for snapshot mode. |
After you specify the job type on Migration Options form, Relational Migrator conducts various checks to ensure that the database is configured correctly. If a configuration is missing, a banner displays indicating improper database setup and provides a Generate Script button for SQL script download.
This script includes the required configuration statements and additional instructions in the form of comments.
Warning
Before proceeding with starting a migration job:
Download the script.
Carefully review its contents.
Execute the statements.
Follow any commented manual steps.
Review and start your migration job
On the Review Summary form, you can see details about your migration job. These details include the type, the number of tables and rows affected, and the estimated data size of the migration job. To start your migration job, click Start.
Note
For Kafka migration jobs, view deployment details by selecting the job in the History pane on the Data Migration screen and hovering over the icon next to the Create Migration Job button.
Next Steps
Learn More
For detailed information regarding the configuration requirements for each database, see the following: