Data Grid Cross-Site Replication Red Hat Data Grid 8.4 Back up data between Data Grid clusters Red Hat Customer Content Services

Commands:
<distributed-cache> <backups> <backup site="NYC" strategy="ASYNC" timeout="10000" /> </backups> </distributed-cache>
{ "distributed-cache": { "backups": { "NYC" : { "backup" : { "strategy" : "ASYNC", "timeout" : "10000" } } } } }
distributedCache: backups: NYC: backup: strategy: "ASYNC" timeout: "10000"
<distributed-cache> <backups> <backup site="NYC" strategy="ASYNC" timeout="10000"> <take-offline after-failures="5"/> </backup> </backups> </distributed-cache>
{ "distributed-cache": { "backups": { "NYC" : { "backup" : { "strategy" : "ASYNC", "timeout" : "10000", "take-offline" : { "after-failures" : "5" } } } } } }
distributedCache: backups: NYC: backup: strategy: "ASYNC" timeout: "10000" takeOffline: afterFailures: "5"
<take-offline after-failures="-1" min-wait="10000"/>
<distributed-cache> <backups> <backup site="NYC" strategy="ASYNC" timeout="10000"> <take-offline after-failures="5" min-wait="15000"/> </backup> </backups> </distributed-cache>
{ "distributed-cache": { "backups": { "NYC" : { "backup" : { "strategy" : "ASYNC", "timeout" : "10000", "take-offline" : { "after-failures" : "5", "min-wait" : "15000" } } } } } }
distributedCache: backups: NYC: backup: strategy: "ASYNC" timeout: "10000" takeOffline: afterFailures: "5" minWait: "15000"
LON NYC k1=(n/a) 0,0 0,0 k1=2 1,0 --> 1,0 k1=2 k1=3 1,1 <-- 1,1 k1=3 k1=5 2,1 1,2 k1=8 --> 2,1 (conflict) (conflict) 1,2 <--
<infinispan> <jgroups> <stack name="xsite" extends="udp"> <relay.RELAY2 xmlns="urn:org:jgroups" site="LON" max_site_masters="1000"/> <remote-sites default-stack="tcp"> <remote-site name="LON"/> <remote-site name="NYC"/> </remote-sites> </stack> </jgroups> <cache-container> <transport cluster="USD{cluster.name}" stack="xsite"/> </cache-container> </infinispan>
<infinispan> <jgroups> <stack name="relay-global" extends="tcp"> <TCPPING initial_hosts="192.0.2.0[7800]" stack.combine="REPLACE" stack.position="MPING"/> </stack> <stack name="xsite" extends="udp"> <relay.RELAY2 site="LON" xmlns="urn:org:jgroups" max_site_masters="10" can_become_site_master="true"/> <remote-sites default-stack="relay-global"> <remote-site name="LON"/> <remote-site name="NYC"/> </remote-sites> </stack> </jgroups> </infinispan>
<replicated-cache name="customers"> <backups> <backup site="NYC" strategy="ASYNC" /> </backups> </replicated-cache>
{ "replicated-cache": { "name": "customers", "backups": { "NYC": { "backup" : { "strategy" : "ASYNC" } } } } }
replicatedCache: name: "customers" backups: NYC: backup: strategy: "ASYNC"
<distributed-cache name="customers"> <backups> <backup site="LON" strategy="ASYNC" /> </backups> </distributed-cache>
{ "distributed-cache": { "name": "customers", "backups": { "LON": { "backup": { "strategy": "ASYNC" } } } } }
distributedCache: name: "customers" backups: LON: backup: strategy: "ASYNC"
<distributed-cache name="eu-customers"> <backups> <backup site="LON" strategy="ASYNC" /> </backups> <backup-for remote-cache="customers" remote-site="LON" /> </distributed-cache>
{ "distributed-cache": { "name": "eu-customers", "backups": { "LON": { "backup": { "strategy": "ASYNC" } } }, "backup-for" : { "remote-cache" : "customers", "remote-site" : "LON" } } }
distributedCache: name: "eu-customers" backups: LON: backup: strategy: "ASYNC" backupFor: remoteCache: "customers" remoteSite: "LON"
<distributed-cache name="eu-customers"> <backups> <backup site="LON" strategy="ASYNC"> <state-transfer chunk-size="600" timeout="2400000" max-retries="30" wait-time="2000" mode="AUTO"/> </backup> </backups> </distributed-cache>
{ "distributed-cache": { "name": "eu-customers", "backups": { "LON": { "backup": { "strategy": "ASYNC", "state-transfer": { "chunk-size": "600", "timeout": "2400000", "max-retries": "30", "wait-time": "2000", "mode": "AUTO" } } } } } }
distributedCache: name: "eu-customers" backups: LON: backup: strategy: "ASYNC" stateTransfer: chunkSize: "600" timeout: "2400000" maxRetries: "30" waitTime: "2000" mode: "AUTO"
<distributed-cache> <backups merge-policy="ALWAYS_REMOVE"> <backup site="LON" strategy="ASYNC"/> </backups> </distributed-cache>
{ "distributed-cache": { "backups": { "merge-policy": "ALWAYS_REMOVE", "LON": { "backup": { "strategy": "ASYNC" } } } } }
distributedCache: backups: mergePolicy: "ALWAYS_REMOVE" LON: backup: strategy: "ASYNC"
<distributed-cache> <backups merge-policy="org.mycompany.MyCustomXSiteEntryMergePolicy"> <backup site="LON" strategy="ASYNC"/> </backups> </distributed-cache>
{ "distributed-cache": { "backups": { "merge-policy": "org.mycompany.MyCustomXSiteEntryMergePolicy", "LON": { "backup": { "strategy": "ASYNC" } } } } }
distributedCache: backups: mergePolicy: "org.mycompany.MyCustomXSiteEntryMergePolicy" LON: backup: strategy: "ASYNC"
<distributed-cache> <backups tombstone-map-size="512000" max-cleanup-delay="30000"> <backup site="LON" strategy="ASYNC"/> </backups> </distributed-cache>
{ "distributed-cache": { "backups": { "tombstone-map-size": 512000, "max-cleanup-delay": 30000, "LON": { "backup": { "strategy": "ASYNC" } } } } }
distributedCache: backups: tombstoneMapSize: 512000 maxCleanupDelay: 30000 LON: backup: strategy: "ASYNC"
INFO [org.infinispan.XSITE] (jgroups-5,<server-hostname>) ISPN000439: Received new x-site view: [NYC] INFO [org.infinispan.XSITE] (jgroups-7,<server-hostname>) ISPN000439: Received new x-site view: [LON, NYC]
Servers at the active site infinispan.client.hotrod.server_list = LON_host1:11222,LON_host2:11222,LON_host3:11222 Servers at the backup site infinispan.client.hotrod.cluster.NYC = NYC_hostA:11222,NYC_hostB:11222,NYC_hostC:11222,NYC_hostD:11222
ConfigurationBuilder builder = new ConfigurationBuilder(); builder.addServers("LON_host1:11222;LON_host2:11222;LON_host3:11222") .addCluster("NYC") .addClusterNodes("NYC_hostA:11222;NYC_hostB:11222;NYC_hostC:11222;NYC_hostD:11222")
site status --cache=cacheName --site=NYC
site bring-online --cache=customers --site=NYC
site take-offline --cache=customers --site=NYC
site state-transfer-mode get --cache=cacheName --site=NYC
site state-transfer-mode set --cache=cacheName --site=NYC --mode=AUTO
site push-site-state --cache=cacheName --site=NYC
GET /rest/v2/caches/{cacheName}/x-site/backups/
{ "NYC": { "status": "online" }, "LON": { "status": "mixed", "online": [ "NodeA" ], "offline": [ "NodeB" ] } }
GET /rest/v2/caches/{cacheName}/x-site/backups/{siteName}
NodeA: offline
NodeB: online
POST /rest/v2/caches/{cacheName}/x-site/backups/{siteName}?action=take-offline
POST /rest/v2/caches/{cacheName}/x-site/backups/{siteName}?action=bring-online
POST /rest/v2/caches/{cacheName}/x-site/backups/{siteName}?action=start-push-state
POST /rest/v2/caches/{cacheName}/x-site/backups/{siteName}?action=cancel-push-state
GET /rest/v2/caches/{cacheName}/x-site/backups?action=push-state-status
NYC: CANCELED
LON: OK
POST /rest/v2/caches/{cacheName}/x-site/local?action=clear-push-state-status
GET /rest/v2/caches/{cacheName}/x-site/backups/{siteName}/take-offline-config
after_failures: 2
min_wait: 1000
PUT /rest/v2/caches/{cacheName}/x-site/backups/{siteName}/take-offline-config
POST /rest/v2/caches/{cacheName}/x-site/backups/{siteName}?action=cancel-receive-state
GET /rest/v2/cache-managers/{cacheManagerName}/x-site/backups/
{ "SFO-3":{ "status":"online" }, "NYC-2":{ "status":"mixed", "online":[ "CACHE_1" ], "offline":[ "CACHE_2" ], "mixed": [ "CACHE_3" ] } }
GET /rest/v2/cache-managers/{cacheManagerName}/x-site/backups/{site}
POST /rest/v2/cache-managers/{cacheManagerName}/x-site/backups/{siteName}?action=take-offline
POST /rest/v2/cache-managers/{cacheManagerName}/x-site/backups/{siteName}?action=bring-online
GET /rest/v2/caches/{cacheName}/x-site/backups/{site}/state-transfer-mode
POST /rest/v2/caches/{cacheName}/x-site/backups/{site}/state-transfer-mode?action=set&mode={mode}
POST /rest/v2/cache-managers/{cacheManagerName}/x-site/backups/{siteName}?action=start-push-state
POST /rest/v2/cache-managers/{cacheManagerName}/x-site/backups/{siteName}?action=cancel-push-state
<infinispan> <cache-container statistics="true"> <jmx enabled="true" domain="example.com"/> </cache-container> </infinispan>
{ "infinispan" : { "cache-container" : { "statistics" : "true", "jmx" : { "enabled" : "true", "domain" : "example.com" } } } }
infinispan: cacheContainer: statistics: "true" jmx: enabled: "true" domain: "example.com"