|
3 | 3 | =================
|
4 | 4 | Create a Sync Job
|
5 | 5 | =================
|
| 6 | + |
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 1 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +Sync jobs are the worker processes responsible for transferring your |
| 14 | +data and schemas from a relational database to MongoDB. Create a new |
| 15 | +sync job from the :guilabel:`Data Migration` tab. |
| 16 | + |
| 17 | +About this Task |
| 18 | +--------------- |
| 19 | + |
| 20 | +The URI credentials you provide when creating a sync job do not |
| 21 | +need to be the same as the credentials used when creating your project. |
| 22 | + |
| 23 | +Before you Begin |
| 24 | +---------------- |
| 25 | + |
| 26 | +- :ref:`Create one or more mapping rules <rm-create-mapping-rules>` in your |
| 27 | + Relational Migrator project. |
| 28 | +- Prepare a :ref:`MongoDB URI <rm-mongodb-database-connection-strings>` and |
| 29 | + credentials that have read/write permissions on your destination database. |
| 30 | + |
| 31 | +Steps |
| 32 | +----- |
| 33 | + |
| 34 | +#. On the :guilabel:`Data Migration` tab, click :guilabel:`Create Sync Job`. |
| 35 | + Relational Migrator only runs one sync job at a time. If a sync job is in progress, this button is disabled. |
| 36 | + |
| 37 | +#. On the :guilabel:`Connect Source DB` form, enter the connection details |
| 38 | + to create the JDBC URI for your relational database. |
| 39 | + |
| 40 | + 2a. Select a database type from the :guilabel:`Database type` drop-down. |
| 41 | + |
| 42 | + 2b. Enter a host IP or DNS name in the :guilabel:`Host` text box. |
| 43 | + |
| 44 | + 2c. Enter a port number in the :guilabel:`Port` text box. |
| 45 | + |
| 46 | + 2d. Enter a database name in the :guilabel:`Database` text field. |
| 47 | + |
| 48 | + Depending on your relational database, this behavior varies: |
| 49 | + |
| 50 | + .. list-table:: |
| 51 | + :header-rows: 1 |
| 52 | + |
| 53 | + * - Database Type |
| 54 | + - Behavior |
| 55 | + * - Oracle |
| 56 | + - You must enter a database name and a :guilabel:`Service ID` or :guilabel:`SID`. |
| 57 | + * - SQL Server |
| 58 | + - Enter a database name, or leave blank to load all databases. |
| 59 | + * - MySQL |
| 60 | + - Enter a database name, or leave blank to load all databases. |
| 61 | + * - Postgres |
| 62 | + - Leaving database name blank loads schemas from the default database. |
| 63 | + |
| 64 | + 2e. Enter a username in the :guilabel:`Username` text box. |
| 65 | + |
| 66 | + 2f. Enter a password in the :guilabel:`Password` text box. |
| 67 | + |
| 68 | + 2g. (Optional) Click the :guilabel:`Save a password for this session` checkbox. |
| 69 | + |
| 70 | + 2h. Click the :guilabel:`SSL` toggle switch to enable or disable SSL and select an SSL mode. |
| 71 | + |
| 72 | + 2i. Click :guilabel:`Connect`. |
| 73 | + |
| 74 | + .. note:: |
| 75 | + |
| 76 | + Connection and SSL details depend on the database type you are connecting to. |
| 77 | + In addition to the generic connection properties listed above, you may also need |
| 78 | + to select a :guilabel:`Identifier` for Oracle and :guilabel:`Authentication` |
| 79 | + for SQL Server. |
| 80 | + |
| 81 | + If you want to specify the JDBC URI manually, click the |
| 82 | + :guilabel:`Enter URI manually` toggle switch on the :guilabel:`Connect SourceDB` |
| 83 | + form. For details, see :ref:`rm-relational-database-connection-strings` |
| 84 | + . |
| 85 | + |
| 86 | +#. Click :guilabel:`Connect`. |
| 87 | + |
| 88 | +#. On the :guilabel:`Connect Destination DB` form, input your |
| 89 | + :guilabel:`MongoDB connection string (URI)`. |
| 90 | + |
| 91 | + If you leave any of the form fields for :guilabel:`Database`, :guilabel:`Username`, |
| 92 | + or :guilabel:`Password` blank, the values specified in the URI are used. |
| 93 | + |
| 94 | +#. Click :guilabel:`Connect`. |
| 95 | + |
| 96 | +#. On the :guilabel:`Migration Options` form, select your |
| 97 | + :guilabel:`Migration Options`: |
| 98 | + |
| 99 | + .. list-table:: |
| 100 | + :header-rows: 1 |
| 101 | + |
| 102 | + * - Migration Option |
| 103 | + - Description |
| 104 | + * - Mode |
| 105 | + - Defines the type of sync job. |
| 106 | + * - Drop destination collections before migration |
| 107 | + - Boolean. Indicates whether Relational Migrator drops a |
| 108 | + destination collection before transferring data. |
| 109 | + * - Stop after errors |
| 110 | + - Integer. Indicates the number of errors after which Relational |
| 111 | + Migrator stops the sync job. |
| 112 | + * - Verify migrated data |
| 113 | + - Boolean. If true, the sync engine checks the migrated data |
| 114 | + against the source database. Only supported for snapshot mode. |
| 115 | + |
| 116 | + Once you have established the database connection and specified the |
| 117 | + job type on the :guilabel:`Migration Options` form, Relational Migrator |
| 118 | + conducts various checks to ensure that the database is configured |
| 119 | + correctly. If any configuration is missing, a banner appears indicating |
| 120 | + that the database is not properly configured, with a |
| 121 | + :guilabel:`GENERATE SCRIPT` button to download a SQL script. |
| 122 | + |
| 123 | + This script includes the required configuration statements |
| 124 | + and additional instructions in the form of comments. |
| 125 | + |
| 126 | + .. warning:: |
| 127 | + |
| 128 | + Before proceeding with starting a sync job: |
| 129 | + |
| 130 | + 1. Download the script. |
| 131 | + 2. Carefully review its contents. |
| 132 | + 3. Execute the statements. |
| 133 | + 4. Follow any commented manual steps. |
| 134 | + |
| 135 | +#. Click :guilabel:`Start`. |
| 136 | + |
| 137 | +Next Steps |
| 138 | +---------- |
| 139 | + |
| 140 | +- :ref:`rm-monitor-jobs` |
| 141 | +- :ref:`rm-data-Verification` |
| 142 | + |
| 143 | +Learn More |
| 144 | +---------- |
| 145 | + |
| 146 | +For detailed information regarding the configuration requirements for each database, |
| 147 | +see the follow Debezium reference links, which are internally utilized by Relational Migrator: |
| 148 | + |
| 149 | +* `MySQL <https://debezium.io/documentation/reference/stable/connectors/mysql.html#setting-up-mysql>`__ |
| 150 | +* `Oracle <https://debezium.io/documentation/reference/stable/connectors/oracle.html#_preparing_the_database>`__ |
| 151 | +* `PostgreSQL <https://debezium.io/documentation/reference/stable/connectors/postgresql.html#setting-up-postgresql>`__ |
| 152 | +* `SQL Server <https://debezium.io/documentation/reference/stable/connectors/sqlserver.html#setting-up-sqlserver>`__ |
0 commit comments