Restoring in multiple regions Stay organized with collections Save and categorize content based on your preferences.
This page describes how torecover orrestore Cassandra in multiple regions.
In a multi-region deployment, Apigee hybrid is deployed in multiple geographic locations across different datacenters. If one or more regions fail, but healthy regions remain, you can use a healthy region torecover failed Cassandra regions with the latest data.
In the event of a catastrophic failure of all hybrid regions, Cassandra can berestored. It is important to note that, if you have multiple Apigee organizations in your deployment, the restore process restores data forall the organizations. In a multi-organization setup, restoring only a specific organization isnot supported.
This topic describes both approaches to salvaging failed region(s):
- Recover failed region(s) - Describes the steps to recover failed region(s) based on a healthy region.
- Restore failed region(s) - Describes the steps to restore failed region(s) from a backup. This approach is only required ifall hybrid regions are impacted.
Recover failed region(s)
To recover failed region(s) from a healthy region, perform the following steps:
- Redirect the API traffic from the impacted region(s) to the good working region. Plan the capacity accordingly to support the diverted traffic from failed region(s).
- Decommission the impacted region. For each impacted region, follow the steps outlined inDecommission a hybrid region. Wait for decommissioning to complete before moving on to the next step.
- Restore the impacted region. To restore, create a new region, as described inMulti-region deployment on GKE, GKE on-prem, and AKS.
Restoring from a backup
Note: If you want to preserve an existing setup for troubleshooting and root cause analysis (RCA), you should delete all theorg andenv components from the Kubernetes clusterexcept the Apigee controller, and retain the cluster. The cluster will contain the existing Apigee datastore (Cassandra) which you can use for troubleshooting. Create a new Kubernetes cluster and then restore Cassandra in the new cluster.The Cassandra backup can either reside on Cloud Storage or on a remote server based on your configuration. To restore Cassandra from a backup, perform the following steps:
Important: If you installed Apigee hybrid into multiple regions, you must check the overrides file for the region you are restoring to make sure thecassandra:hostNetwork is set tofalse before you perform the restoration. To check thehostNetwork setting in the region you are trying to restore, use this command:kubectl-nAPIGEE_NAMESPACEgetapigeeds-o=jsonpath='{.items[].spec.components.cassandra.hostNetwork}'
- Open the overrides file for the region you wish to restore.
- Set
cassandra:hostNetworktofalse. - Apply the overrides file:
helm upgrade datastore apigee-datastore/ \ --install \ --namespaceAPIGEE_NAMESPACE \ -fOVERRIDES_FILE
- Before continuing, check to make sure the
hostNetworkis set tofalse:kubectl-nAPIGEE_NAMESPACEgetapigeeds-o=jsonpath='{.items[].spec.components.cassandra.hostNetwork}'
- Delete hybrid from the region you are restoring:
helm deleteDATASTORE_RELEASE_NAME \ --namespaceAPIGEE_NAMESPACE
WhereDATASTORE_RELEASE_NAME is the release name of the datastore you installed Cassandra in the region, for example
Note: Be careful which release of the datastore component you delete. You can see your releases with the commanddatastore-region1.helm -nAPIGEE_NAMESPACE ls. Restore the desired region from a backup. For more information, seeRestoring a region from a backup.
- Remove the dead nodes from the deleted region(s):
- Using the
nodetool statuscommand, identify all the nodes withDNstatus in the deleted region(s):kubectlexecapigee-cassandra-default-0-nAPIGEE_NAMESPACE--nodetool-uAPIGEE_JMX_USER-pwAPIGEE_JMX_PASSWORDstatuswhere:
- APIGEE_JMX_USER is the username for the Cassandra JMX operations user. Used to authenticate and communicate with the Cassandra JMX interface. See
cassandra:auth:jmx:username. - APIGEE_JMX_PASSWORD is the password for the Cassandra JMX operations user. See
cassandra:auth:jmx:password.
- APIGEE_JMX_USER is the username for the Cassandra JMX operations user. Used to authenticate and communicate with the Cassandra JMX interface. See
- Remove each node with
DNstatus in the deleted region(s):kubectlexecapigee-cassandra-default-0-nAPIGEE_NAMESPACE--nodetool-uAPIGEE_JMX_USER-pwAPIGEE_JMX_PASSWORDremovenodeNODE_HOST_IDReplaceNODE_HOST_ID with the Host ID of each node you identified in the previous step. For example:
kubectlexecapigee-cassandra-default-0-napigee--nodetool-umy-jmx-id-pwmy-jmx-pwdremovenodeabcdef-f202-438a-8a77-40636317b7c9 - Run the
nodetool statuscommand again and verify that the nodes withDNstatus in the deleted region(s) are gone.kubectlexecapigee-cassandra-default-0-nAPIGEE_NAMESPACE--nodetool-uAPIGEE_JMX_USER-pwAPIGEE_JMX_PASSWORDstatus
- Using the
- Remove the deleted region(s) references and add the restored region(s) references in the
KeySpacesmetadata.- Get the cassandra datacenter name by using the
nodetool statusoption.kubectl exec -nAPIGEE_NAMESPACE -it apigee-cassandra-default-0 -- bash nodetool -uAPIGEE_JMX_USER -pwAPIGEE_JMX_PASSWORD status |grep -i Datacenter
where:
- APIGEE_JMX_USER is the username for the Cassandra JMX operations user. Used to authenticate and communicate with the Cassandra JMX interface. See
cassandra:auth:jmx:username. - APIGEE_JMX_PASSWORD is the password for the Cassandra JMX operations user. See
cassandra:auth:jmx:password.
- APIGEE_JMX_USER is the username for the Cassandra JMX operations user. Used to authenticate and communicate with the Cassandra JMX interface. See
- Update the
KeySpacesreplication.- Create a client container and connect to the Cassandra cluster through the CQL interface.
- Get the list of user keyspaces from CQL interface:
cqlshCASSANDRA_SEED_HOST -uAPIGEE_DDL_USER -pAPIGEE_DDL_PASSWORD --ssl -e "select keyspace_name from system_schema.keyspaces;"|grep -v system
where:
- CASSANDRA_SEED_HOST is the Cassandra multi-region seed host. For most multi-region installations, use the IP address of a host in your first region. SeeConfigure Apigee hybrid for multi-region and
cassandra:externalSeedHost. - APIGEE_DDL_USER andAPIGEE_DDL_PASSWORD are the admin username and password for the Cassandra Data Definition Language (DDL) user. The default values are "
ddl_user" and "iloveapis123".You can check the DDL username and password by checking the value stored in theapigee-datastore-default-credssecret. You must have admin privileges to check this secret. The following command will return base-64 encoded values for the DDL username and password:kubectl get secret apigee-datastore-default-creds -nAPIGEE_NAMESPACE -o yaml
See
cassandra.auth.ddl.passwordin the Configuration properties reference andCommand Line Options in the Apache Cassandra cqlsh documentation.
- CASSANDRA_SEED_HOST is the Cassandra multi-region seed host. For most multi-region installations, use the IP address of a host in your first region. SeeConfigure Apigee hybrid for multi-region and
- For each keyspace, run the following command from the CQL interface to update the replication settings:
ALTER KEYSPACEKEYSPACE_NAME WITH replication = {'class': 'NetworkTopologyStrategy', 'DATACENTER_NAME':3};where:
- KEYSPACE_NAME is the name of the keyspace listed in the previous step's output.
- DATACENTER_NAME is name of the Cassandra datacenter you obtained with the
nodetool statusoption in step 8.
- Get the cassandra datacenter name by using the
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.