16.2. Synchronizing data to target clusters
When you set up a target Data Grid cluster and connect it to a source cluster, the target cluster can handle client requests using a remote cache store and load data on demand. To completely migrate data to the target cluster, so you can decommission the source cluster, you can synchronize data. This operation reads data from the source cluster and writes it to the target cluster. Data migrates to all nodes in the target cluster in parallel, with each node receiving a subset of the data. You must perform the synchronization for each cache that you want to migrate to the target cluster.
Prerequisites
- Set up a target cluster with the appropriate Data Grid version.
Procedure
Start synchronizing each cache that you want to migrate to the target cluster with the Data Grid Command Line Interface (CLI) or REST API.
CLI: Use the
migrate cluster synchronizecommand.migrate cluster synchronize -c myCacheREST API: Use the
?action=sync-dataparameter with a POST request.POST /rest/v2/caches/myCache?action=sync-dataWhen the operation completes, Data Grid responds with the total number of entries copied to the target cluster.
Disconnect each node in the target cluster from the source cluster.
CLI: Use the
migrate cluster disconnectcommand.migrate cluster disconnect -c myCacheREST API: Invoke a DELETE request.
DELETE /rest/v2/caches/myCache/rolling-upgrade/source-connection
Next steps
After you synchronize all data from the source cluster, the rolling upgrade process is complete. You can now decommission the source cluster.