Loading Initial Data into a Target DB System
Unless the source server has no data when inbound replication is configured, a consistent snapshot of the data from the source server must be loaded into the target DB system.
It is recommended to use one of the following methods:
                  
- Logical export and import with MySQL Shell- Export the data from the source server with MySQL Shell. See Exporting a MySQL Instance.
- Import the data into a new target DB system. See Importing Using the Data Import Feature. 
                              Alternatively, you can import the data into an existing target DB system with MySQL Shell. See Importing Using MySQL Shell. You should specify the updateGtidSet:"append"option so that thegtid_purgedvariable is populated with the GTID set of all transactions that have been executed in the initial data.
 
- DB system backup and restore
Note
 This method applies only when the source server is a HeatWave DB system.- Backup the source DB system. See Creating a Manual Backup.
- Restore the backup to a new target DB system. See Restoring From a Backup.
                              Note
 If the source and backup DB systems are located in different regions, you can copy the backup from the region of the source DB system to the region of the target DB system prior to the restore. See Copying a Backup to Another Region.
 
sys.SET_GTID_PURGED stored procedure to update the gtid_purged variable.
               Setting gtid_purged variable
If you need to set the 
gtid_purged variable prior to creating or enabling a channel, you can perform the following:
                  - Identify the set of GTID of all transactions that have been executed prior to the initial data loaded into the target DB system.
- Connect to the target DB system and add the GTID set to gtid_purgedusing the following command:
 This command runs a stored procedure on the DB system to change the value of theCALL sys.SET_GTID_PURGED("+<gtidSet>")gtid_purgedsystem variable.- <gtidSet>is the value of the GTID set.
- The +sign appends the GTID set to the DB system'sgtid_purgedsystem variable.