This topic describes how to change the current offset in the Incremental Write module of a data synchronization or migration instance by using Data Transmission Service (DTS).
Background information
The current offset is the time at which the latest data is written to the destination database. You can change the Current Offset in the Incremental Write module of a data synchronization or migration instance. Then, DTS synchronizes or migrates incremental data from the new current offset.
Scenarios
If you want to synchronize or migrate incremental data that is generated from a specific time to the current time to the destination database again, you can change the current offset in the Incremental Write module to the specific time. Then, DTS synchronizes or migrates the incremental data generated within the specified time range again.
If you do not want to synchronize or migrate incremental data that is generated from the current time to a specific time to the destination database, you can change the current offset in the Incremental Write module to the specific time. Then, DTS does not synchronize or migrate the incremental data generated within the specified time range.
If data of the current offset does not exist and DTS fails to run the task, DTS retries. In this case, you can adjust the current offset backward, and DTS tries to resume the data synchronization or migration instance.
Prerequisites
A data synchronization or migration instance that involves incremental data synchronization or migration is created. For more information, see Overview of data synchronization scenarios or Overview of data migration scenarios.
The data synchronization or migration instance is in the Incremental Write module and is not in the Modifying Objects state.
Impacts
If the new current offset that you specify is later than the original current offset, DTS does not synchronize or migrate incremental data generated within the time range between the offsets to the destination database. This may cause data loss or inconsistency. Proceed with caution.
If the new current offset that you specify is earlier than the original current offset, DTS synchronizes or migrates incremental data generated within the time range between the offsets to the destination database again. If DTS synchronizes or migrates the INSERT and DDL operations that already exist in the destination database, data conflicts may occur. Proceed with caution.
After you change the current offset of an instance that is suspended, the instance is automatically started.
Usage notes
If you synchronize or migrate data between ApsaraDB for Redis Enhanced Edition (Tair) or Redis instances, you cannot change the current offset.
If the synchronization or migration instance is in the Modifying Objects state, you cannot change the current offset.
If you change the current offset of a distributed instance, the change takes effect only on the current subtask.
By default, the range within which you can specify a new current offset is the previous seven days. This range may vary based on factors such as the duration of incremental data synchronization or migration and the latency of the instance.
Procedure
Go to the Data Synchronization Tasks or Data Migration Tasks page.
Log on to the Data Management (DMS) console.
In the top navigation bar, click DTS.
In the left-side navigation pane, choose or .
NoteIf you use the simple mode of the DMS console, move the pointer over the icon in the upper-left corner and choose Customize the layout and style of the DMS console.
or . For more information, seeYou can also go to the Data Synchronization Tasks or Data Migration Tasks page of the new DTS console.
Select the region in which your data synchronization or migration task resides from the drop-down list to the right of Data Synchronization Tasks or Data Migration Tasks.
NoteIf you use the new DTS console, you must select the region from the region drop-down list to the right of Workbench in the top navigation bar.
Click the icon in the Actions column of the instance that you want to manage and then click Pause Task.
Click the ID of the data synchronization or migration task to go to the task details page.
Optional. In the left-side pane, click Task Management.
In the Progress section, click Incremental Write.
Change the current offset.
On the Basic Information tab, click Edit to the right of Current Offset.
In the Precautions message, read the message and click Next.
In the Modify Incremental Write Offset dialog box, select a timestamp for the new current offset in the Offset field.
Click OK.
In the Note message, click OK.
View the result.
On the Basic Information tab of the Incremental Write module, you can view the current offset after the instance is initialized.
NoteYou can click the icon to refresh the page and view the initialization progress and current offset of the instance.
After the current offset is changed, we recommend that you use the data verification feature to check whether the new current offset meets your business requirements. For more information, see Configure data verification.