Chapter 7. Performing Cross-Site Replication Operations
Data Grid clusters running in different locations can discover and communicate with each other to backup data.
Prerequisites
- Start the Data Grid CLI.
- Connect to a running Data Grid cluster.
7.1. Bringing Backup Locations Offline and Online Copy linkLink copied to clipboard!
Take backup locations offline manually and bring them back online.
Procedure
- Create a CLI connection to Data Grid.
Check if backup locations are online or offline with the
site statuscommand:[//containers/default]> site status --cache=cacheName --site=NYC
[//containers/default]> site status --cache=cacheName --site=NYCCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note--siteis an optional argument. If not set, the CLI returns all backup locations.Manage backup locations as follows:
Bring backup locations online with the
bring-onlinecommand:[//containers/default]> site bring-online --cache=customers --site=NYC
[//containers/default]> site bring-online --cache=customers --site=NYCCopy to Clipboard Copied! Toggle word wrap Toggle overflow Take backup locations offline with the
take-offlinecommand:[//containers/default]> site take-offline --cache=customers --site=NYC
[//containers/default]> site take-offline --cache=customers --site=NYCCopy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information and examples, run the help site command.
7.2. Configuring Cross-Site State Transfer Modes Copy linkLink copied to clipboard!
You can configure cross-site state transfer operations to happen automatically when Data Grid detects that backup locations come online. Alternatively you can use the default mode, which is to manually perform state transfer through the CLI or via JMX or REST.
Procedure
- Create a CLI connection to Data Grid.
Use the
sitecommand to configure state transfer modes, as in the following examples:Retrieve the current state transfer mode.
[//containers/default]> site state-transfer-mode get --cache=cacheName --site=NYC "MANUAL"
[//containers/default]> site state-transfer-mode get --cache=cacheName --site=NYC "MANUAL"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure automatic state transfer operations for a cache and backup location.
[//containers/default]> site state-transfer-mode set --cache=cacheName --site=NYC --mode=AUTO
[//containers/default]> site state-transfer-mode set --cache=cacheName --site=NYC --mode=AUTO
Run the help site command for more information and examples.
7.3. Pushing State to Backup Locations Copy linkLink copied to clipboard!
Transfer cache state to remote backup locations.
Procedure
- Create a CLI connection to Data Grid.
Use the
sitecommand to push state transfer, as in the following example:[//containers/default]> site push-site-state --cache=cacheName --site=NYC
[//containers/default]> site push-site-state --cache=cacheName --site=NYCCopy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information and examples, run the help site command.