Auf dieser Seite wird beschrieben, wie Cassandra in mehreren Regionen zurückgeholt oder wiederhergestellt wird.
In einer multiregionalen Bereitstellung wird Apigee Hybrid an mehreren geografischen Standorten in verschiedenen Rechenzentren bereitgestellt. Wenn eine oder mehrere Regionen fehlschlagen, aber fehlerfreie Regionen verbleiben, können Sie fehlgeschlagene Cassandra-Regionen anhand einer fehlerfreien Region mit den neuesten Daten wiederherstellen.
Bei einem katastrophalen Ausfall aller Hybridregionen kann Cassandra wiederhergestellt werden.
Wenn Sie mehrere Apigee-Organisationen in Ihrer Bereitstellung haben, werden bei der Wiederherstellung Daten für alle Organisationen wiederhergestellt. In einer Einrichtung mit mehreren Organisationen wird nur die Wiederherstellung einer bestimmten Organisation nicht unterstützt.
In diesem Thema werden beide Ansätze zum Wiederherstellen fehlgeschlagener Regionen beschrieben:
Fehlgeschlagene Region(en) wiederherstellen: Beschreibt die Schritte zum Wiederherstellen fehlgeschlagener Regionen aus einer Sicherung. Dieser Ansatz ist nur erforderlich, wenn alle Hybridregionen betroffen sind.
Fehlgeschlagene Region(en) wiederherstellen
So stellen Sie fehlgeschlagene Regionen aus einer fehlerfreien Region wieder her:
Leiten Sie den API-Traffic von den betroffenen Regionen an die funktionierende Arbeitsregion weiter. Planen Sie die Kapazität entsprechend, um den weitergeleiteten Traffic aus fehlgeschlagenen Regionen zu unterstützen.
Deaktivieren Sie die betroffene Region. Führen Sie für jede betroffene Region die Schritte aus, die unter Hybridregion außer Betrieb nehmen beschrieben werden. Warten Sie, bis die Außerbetriebnahme abgeschlossen ist, bevor Sie fortfahren.
Die Cassandra-Sicherung kann sich je nach Konfiguration entweder in Cloud Storage oder auf einem Remote-Server befinden.
Gehen Sie so vor, um Cassandra aus einer Sicherung wiederherzustellen:
Öffnen Sie die Überschreibungsdatei für die Region, die Sie wiederherstellen möchten.
APIGEE_JMX_USER ist der Nutzername für den Cassandra JMX-Betriebsnutzer. Wird zur Authentifizierung und Kommunikation mit der Cassandra JMX-Schnittstelle verwendet. Siehe cassandra:auth:jmx:username.
APIGEE_JMX_PASSWORD ist das Passwort für den Cassandra JMX-Betriebsnutzer.
Siehe cassandra:auth:jmx:password.
Rufen Sie die Liste der Nutzerschlüsselbereiche über die CQL-Schnittstelle ab:
cqlsh CASSANDRA_SEED_HOST -u APIGEE_DDL_USER -p APIGEE_DDL_PASSWORD
--ssl -e "select keyspace_name from system_schema.keyspaces;"|grep -v system
Dabei gilt:
CASSANDRA_SEED_HOST ist der multiregionale Seed-Host von Cassandra. Verwenden Sie für die meisten multiregionalen Installationen die IP-Adresse eines Hosts in der ersten Region. Weitere Informationen finden Sie unter Apigee Hybrid für mehrere Regionen konfigurieren und cassandra:externalSeedHost.
APIGEE_DDL_USER und APIGEE_DDL_PASSWORD sind der Admin-Nutzername und das Admin-Passwort für den Cassandra-DDL-Nutzer (Data Definition Language). Die Standardwerte sind "ddl_user" und "iloveapis123".
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-28 (UTC)."],[[["\u003cp\u003eThis document outlines two primary methods for addressing Cassandra failures in multi-region Apigee hybrid deployments: recovering from a healthy region or restoring from a backup.\u003c/p\u003e\n"],["\u003cp\u003eIf one or more regions fail, the process to recover failed regions involves redirecting API traffic to a healthy region, decommissioning the failed region(s), and then creating and restoring a new region.\u003c/p\u003e\n"],["\u003cp\u003eIn the event of total regional failure, all organizations' data is restored simultaneously by way of the restore from backup method, which does not allow for the restore of a specific organization.\u003c/p\u003e\n"],["\u003cp\u003eThe restoration process requires ensuring that \u003ccode\u003ecassandra:hostNetwork\u003c/code\u003e is set to \u003ccode\u003efalse\u003c/code\u003e in the overrides file before deleting the hybrid data from the region being restored and proceeding with the restoration steps.\u003c/p\u003e\n"],["\u003cp\u003eRestoring the data includes updating keyspace metadata and replication settings using the Cassandra Query Language (CQL) interface, along with a reference to a variety of commands and information needed.\u003c/p\u003e\n"]]],[],null,["# Restoring in multiple regions\n\n| You are currently viewing version 1.14 of the Apigee hybrid documentation. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis page describes how to *recover* or *restore* Cassandra in multiple regions.\n\nIn a multi-region deployment, Apigee hybrid is deployed in multiple geographic locations across\ndifferent datacenters. If one or more regions fail, but healthy regions remain, you can use a healthy region to *recover*\nfailed Cassandra regions with the latest data.\n\n\nIn the event of a catastrophic failure of all hybrid regions, Cassandra can be *restored* .\nIt is important to note that, if you have multiple Apigee organizations in your deployment,\nthe restore process restores data for **all** the organizations. In a multi-organization setup,\nrestoring only a specific organization is **not** supported.\n\nThis topic describes both approaches to salvaging failed region(s):\n\n- [Recover failed region(s)](#recover-failed-region) - Describes the steps to recover failed region(s) based on a healthy region.\n- [Restore failed region(s)](#restore-nongcs) - Describes the steps to restore failed region(s) from a backup. This approach is only required if *all* hybrid regions are impacted.\n\nRecover failed region(s)\n------------------------\n\nTo recover failed region(s) from a healthy region, perform the following steps:\n\n1. 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).\n2. Decommission the impacted region. For each impacted region, follow the steps outlined in [Decommission a hybrid region](/apigee/docs/hybrid/v1.14/decommission-region). Wait for decommissioning to complete before moving on to the next step.\n\n \u003cbr /\u003e\n\n3. Restore the impacted region. To restore, create a new region, as described in [Multi-region deployment on GKE, GKE on-prem, and AKS](/apigee/docs/hybrid/v1.14/multi-region).\n\nRestoring from a backup\n-----------------------\n\n| **Note** : If you want to preserve an existing setup for troubleshooting and root cause analysis (RCA), you should delete all the `org` and `env` components from the Kubernetes cluster *except* 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.\n\nThe Cassandra backup can either reside on Cloud Storage or on a remote server based on your configuration.\nTo restore Cassandra from a backup, perform the following steps:\n| **Important:** If you installed Apigee hybrid into multiple regions, you must check the overrides file for the region you are restoring to make sure the `cassandra:hostNetwork` is set to `false` before you perform the restoration. To check the `hostNetwork` setting in the region you are trying to restore, use this command: \n|\n| ```\n| kubectl -n APIGEE_NAMESPACE get apigeeds -o=jsonpath='{.items[].spec.components.cassandra.hostNetwork}'\n| ```\n\n1. Open the overrides file for the region you wish to restore.\n2. Set `cassandra:hostNetwork` to `false`.\n3. Apply the overrides file: \n\n ```\n helm upgrade datastore apigee-datastore/ \\\n --install \\\n --namespace APIGEE_NAMESPACE \\\n -f OVERRIDES_FILE\n ```\n4. Before continuing, check to make sure the `hostNetwork` is set to `false`: \n\n ```\n kubectl -n APIGEE_NAMESPACE get apigeeds -o=jsonpath='{.items[].spec.components.cassandra.hostNetwork}'\n ```\n5. Delete hybrid from the region you are restoring: \n\n ```\n helm delete DATASTORE_RELEASE_NAME \\\n --namespace APIGEE_NAMESPACE\n ```\n\n Where \u003cvar translate=\"no\"\u003eDATASTORE_RELEASE_NAME\u003c/var\u003e is the release name of the datastore you\n installed Cassandra in the region, for example `datastore-region1`.\n | **Note:** Be careful which release of the datastore component you delete. You can see your releases with the command `helm -n `\u003cvar translate=\"no\"\u003eAPIGEE_NAMESPACE\u003c/var\u003e` ls`.\n6. Restore the desired region from a backup. For more information,\n see [Restoring a region from a backup](/apigee/docs/hybrid/v1.14/restore-cassandra-single-region#restore-gcs).\n\n7. Remove the deleted region(s) references and add the restored region(s) references in the `KeySpaces` metadata.\n8. Get the cassandra datacenter name by using the `nodetool status` option. \n\n ```\n kubectl exec -n APIGEE_NAMESPACE -it apigee-cassandra-default-0 -- bash\n nodetool -u APIGEE_JMX_USER -pw APIGEE_JMX_PASSWORD status |grep -i Datacenter\n ```\n\n where:\n - \u003cvar translate=\"no\"\u003eAPIGEE_JMX_USER\u003c/var\u003e 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/docs/hybrid/v1.14/config-prop-ref#cassandra-auth-jmx-username).\n - \u003cvar translate=\"no\"\u003eAPIGEE_JMX_PASSWORD\u003c/var\u003e is the password for the Cassandra JMX operations user. See [`cassandra:auth:jmx:password`](/apigee/docs/hybrid/v1.14/config-prop-ref#cassandra-auth-jmx-password).\n9. Update the `KeySpaces` replication.\n 1. [Create a client container](/apigee/docs/api-platform/troubleshoot/playbooks/cassandra/ts-cassandra#create-a-client-container-for-debugging) and connect to the Cassandra cluster through the CQL interface.\n 2. Get the list of user keyspaces from CQL interface: \n\n ```\n cqlsh CASSANDRA_SEED_HOST -u APIGEE_DDL_USER -p APIGEE_DDL_PASSWORD\n --ssl -e \"select keyspace_name from system_schema.keyspaces;\"|grep -v system\n ```\n\n where:\n - \u003cvar translate=\"no\"\u003eCASSANDRA_SEED_HOST\u003c/var\u003e is the Cassandra multi-region seed host. For most multi-region installations, use the IP address of a host in your first region. See [Configure Apigee\n hybrid for multi-region](/apigee/docs/hybrid/v1.14/multi-region#configure-apigee-hybrid-for-multi-region) and [`cassandra:externalSeedHost`](/apigee/docs/hybrid/v1.14/config-prop-ref#cassandra-externalseedhost).\n - \u003cvar translate=\"no\"\u003eAPIGEE_DDL_USER\u003c/var\u003e and \u003cvar translate=\"no\"\u003eAPIGEE_DDL_PASSWORD\u003c/var\u003e 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 the `apigee-datastore-default-creds`secret. You must have admin privileges to check this secret. The following command will return base-64 encoded values for the DDL username and password: \n |\n | ```\n | kubectl get secret apigee-datastore-default-creds -n APIGEE_NAMESPACE -o yaml\n | ```\n\n\n See [`cassandra.auth.ddl.password`](/apigee/docs/hybrid/v1.14/config-prop-ref#cassandra-auth.ddl.password)\n in the Configuration properties reference and\n [Command\n Line Options](https://cassandra.apache.org/doc/4.1/cassandra/tools/cqlsh.html#command-line-options) in the Apache Cassandra cqlsh documentation.\n 3. For each keyspace, run the following command from the CQL interface to update the replication settings: \n\n ```\n ALTER KEYSPACE KEYSPACE_NAME WITH replication = {'class': 'NetworkTopologyStrategy', 'DATACENTER_NAME':3};\n ```\n\n where:\n - \u003cvar translate=\"no\"\u003eKEYSPACE_NAME\u003c/var\u003e is the name of the keyspace listed in the previous step's output.\n - \u003cvar translate=\"no\"\u003eDATACENTER_NAME\u003c/var\u003e is name of the Cassandra datacenter you obtained with the `nodetool status` option in step 8."]]