Replication with Externally-Initiated backups provided by the user (binlog replication)
In this method, Delphix Continuous Data Engine creates a staging database using an initial backup from the source database. This initial backup is provided by you. To ensure that the staging database remains in sync with the source database, Delphix Continuous Data Engine sets up a MySQL native replication from the source database to the staging database.
The following diagram demonstrates the architecture of the Delphix Continuous Data Engine support for the MySQL database linking with the “MySQL BinLog Replication with Externally-initiated Backup” between the source and staging database.
![extern-ini.jpg](../../__attachments/205336644/extern-ini.jpg?inst-v=9f5cd9ef-94fe-4677-b3c4-6c5d1617af5c)
Prerequisites
Before you begin ingestion and creating a dSource, ensure that you meet the following requirements.
The environment requirements are met by the source and staging environments as described in Requirements for MySQL source hosts and Requirements for MySQL staging/target hosts.
The environment user must have the necessary permissions to access the MySQL commands.
A database must be created on the staging environment's MySQL installation.
For more information, refer to Requirements and Prerequisites.
Procedure
Perform the following steps to create a dSource using the Externally-initiated single database backup ingestion.
Login to the Delphix Management application.
Navigate to the Manage > Environments page and select the Staging environment from the list of environments.
On the Databases tab, choose an installation for your dSource and click the icon.
In the Add Database dialog window, provide the Data Directory, Port, Base Directory of the source database, and SourceConfigName for your source configuration, and then click Add. It is necessary to provide values for all the fields for the Replication ingestion type.
Select your source configuration and click the Add dSource link located on the right.
On the Source tab, the selected MySQL source configuration will appear as selected by default. Do the following:
Select Replication from the Ingestion Type dropdown, it’ll show all the fields relevant to the Replication ingestion mechanism.
Staging DB Server ID: This is the Server ID for the dSource database. This server ID must be greater than the source db server ID for Replication Mode to work.
Staging DB Port: The port number to be used by the staging dSource instance. Any other application or MySQL server should not use this port.
Staging Initialization Password: This is the Password that the connector uses when it initializes the staging database MySQL instance. This password will be assigned to the 'root' user of the staging database. This password will be used only for the first time the staging database instance is initialized. Note: Once replication starts, this password will be updated with Source DB’s root user password.
MySQL Base Directory: Please provide the location of the MySQL installation directory. This generally has the location of
/bin/mysql
.Mount Location on Staging Host: This is the Delphix mount directory on the staging host. This location should be unique and unoccupied. Additionally, refer to Requirements for MySQL staging/target hosts to understand user privileges to create mount directories.
IP Address of the Source DB Host: The IP address or FQDN of the source host.
Source DB UserName: Delphix Continuous Data Engine database user on the source database. Delphix Continuous Data Engine will use this db user to manage the dSource and other sync operations.
Source DB Password: The password for the source database user.
Full path (including filename) to MySQL Backup: Full path,including the filename, to the full source database backup to use for dSource creation.
Provide different Replication users: The users can provide different replication user credentials by selecting this checkbox, as illustrated in the image below. Providing separate replication user credentials is optional. If this checkbox is not selected, the source database user provided above will be used for replication.
Replication UserName: user with replication privileges to configure replication from source to staging db. If this user is not provided, then the Delphix Continuous Data Engine uses the Source DB user for replication, as mentioned in steps g and h.
Replication User’s Password: The password for the Replication UserName.
On the dSource Configuration screen, select the dataset group where the dSource will be placed and click Next.
Select the staging environment and the environment user on the Data Management screen. Please note that there will be a checkbox with the label “Resynchronize dSource“ on this page, this will be checked by default. This is needed to initialize and refresh the mysql staging database. Please keep it as it is and then click Next.
Select the Snapsync and Retention policies for the dSource and click Next on the Policies screen.
Add any pre-sync and/or post-sync hooks needed on the Hooks screen, then click Next.
On the Summary screen, review the dSource configuration and click Submit. The linking process has begun. Wait for the snapshot to be created. From that snapshot, you can now create a new VDB.