Cette page explique comment restaurer Cassandra dans Apigee hybrid.
Pourquoi utiliser la restauration ?
Vous pouvez utiliser des sauvegardes pour restaurer entièrement l'infrastructure Apigee en cas de défaillances catastrophiques, telles qu'une perte de données irrécupérable dans votre instance hybride Apigee.
La restauration extrait vos données de l'emplacement de sauvegarde et les restaure dans un nouveau cluster Cassandra présentant le même nombre de nœuds. Aucune donnée de cluster n'est extraite de l'ancien cluster Cassandra.
L'objectif du processus de restauration est de rétablir un état d'origine opérationnel de l'installation d'Apigee hybrid à l'aide des données de sauvegarde d'un instantané.
L'utilisation de sauvegardes pour restaurer n'est pas recommandée dans les scénarios suivants :
Défaillances de nœuds Cassandra.
Suppression accidentelle de données telles que apps, developers et api_credentials.
Panne d'une ou plusieurs régions dans un déploiement hybride multirégional.
Les déploiements et l'architecture opérationnelle d'Apigee Cassandra prennent en charge la redondance et la tolérance aux pannes d'une seule région.
Dans la plupart des cas, la mise en œuvre multirégionale de production recommandée pour l'environnement hybride signifie qu'une défaillance régionale peut être récupérée à partir d'une autre région à l'aide de procédures de mise hors service et d'expansion des régions au lieu d'une restauration à partir d'une sauvegarde.
Avant de commencer la mise en œuvre d'une restauration à partir d'une sauvegarde Cassandra, tenez compte des points suivants :
Temps d'arrêt : un temps d'arrêt survient pendant toute la durée de la restauration.
Perte de données : il y a une perte de données entre la dernière sauvegarde valide et la fin de la restauration.
Heure de restauration : la durée de la restauration dépend de la taille des données et du cluster.
Sélection de données :vous ne pouvez pas sélectionner uniquement certaines données spécifiques à restaurer. La restauration restaure l'intégralité de la sauvegarde que vous avez sélectionnée.
Restaurations multirégionales
Si vous avez installé Apigee hybrid dans plusieurs régions, vous devez vérifier le fichier de remplacement correspondant à la région que vous restaurez, afin de vous assurer que cassandra:hostNetwork est défini sur false avant d'effectuer la restauration. Pour en savoir plus, consultez la page Effectuer une restauration dans plusieurs régions.
Prérequis
Vérifiez que toutes les conditions préalables suivantes sont bien remplies. Analysez tout manquement à ces conditions préalables avant de procéder à la restauration.
Vérifiez, à l'aide de la commande suivante, que tous les pods Cassandra fonctionnent correctement :
kubectl get pods -n APIGEE_NAMESPACE -l app=apigee-cassandra
La sortie doit se présenter sous la forme suivante :
NAME READY STATUS RESTARTS AGE
apigee-cassandra-default-0 1/1 Running 0 14m
apigee-cassandra-default-1 1/1 Running 0 13m
apigee-cassandra-default-2 1/1 Running 0 11m
exampleuser@example hybrid-files %
Vérifiez, à l'aide de la commande suivante, que le StatefulSet Cassandra indique que tous les pods sont en cours d'exécution :
kubectl get sts -n APIGEE_NAMESPACE -l app=apigee-cassandra
La sortie doit se présenter sous la forme suivante :
NAME READY AGE
apigee-cassandra-default 3/3 15m
Vérifiez, à l'aide de la commande suivante, que la ressource ApigeeDatastore est à l'état running :
kubectl get apigeeds -n APIGEE_NAMESPACE
La sortie doit se présenter sous la forme suivante :
NAME STATE AGE
default running 16m
Vérifiez, à l'aide de la commande suivante, que tous les PVC Cassandra sont à l'état Bound :
kubectl get pvc -n APIGEE_NAMESPACE -l app=apigee-cassandra
La sortie doit se présenter sous la forme suivante :
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
cassandra-data-apigee-cassandra-default-0 Bound pvc-a14184e7-8745-4b30-8069-9d50642efe04 10Gi RWO standard-rwo 17m
cassandra-data-apigee-cassandra-default-1 Bound pvc-ed129dcb-4706-4bad-a692-ac7c78bad64d 10Gi RWO standard-rwo 15m
cassandra-data-apigee-cassandra-default-2 Bound pvc-faed0ad1-9019-4def-adcd-05e7e8bb8279 10Gi RWO standard-rwo 13m
Vérifiez, à l'aide de la commande suivante, que tous les PV Cassandra sont à l'état Bound :
kubectl get pv -n APIGEE_NAMESPACE
La sortie doit se présenter sous la forme suivante :
Vérifiez, à l'aide de la commande suivante, que la ressource de contrôleur Apigee est à l'état Running :
kubectl get pods -n APIGEE_NAMESPACE-system -l app=apigee-controller
La sortie doit se présenter sous la forme suivante :
NAME READY STATUS RESTARTS AGE
apigee-controller-manager-856d9bb7cb-cfvd7 2/2 Running 0 20m
Procédure de restauration
Les étapes de restauration de Cassandra diffèrent légèrement selon que votre Apigee hybrid est déployé dans une ou plusieurs régions. Pour obtenir la procédure de restauration détaillée, consultez la documentation suivante :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/28 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/28 (UTC)."],[[["\u003cp\u003eRestoration of Cassandra in Apigee hybrid is used to recover from catastrophic failures by restoring data from backups to a new cluster, bringing the system back to a previously operational state.\u003c/p\u003e\n"],["\u003cp\u003eRestoration from backups is not recommended for common issues like node failures, accidental data deletion, or region outages in multi-region setups, as Apigee's architecture handles these scenarios.\u003c/p\u003e\n"],["\u003cp\u003ePerforming a restore involves downtime and potential data loss between the last backup and the completion of the restoration, and it will restore the entire backup, not specific data.\u003c/p\u003e\n"],["\u003cp\u003ePrior to starting the restoration process, it is required to verify that the Cassandra pods, statefulset, ApigeeDatastore, PVCs, PVs, and Apigee Controller are all in the correct status.\u003c/p\u003e\n"],["\u003cp\u003eRestoration steps differ between single and multi-region deployments, and it is crucial to use a backup file that matches the hybrid installation version to ensure compatibility.\u003c/p\u003e\n"]]],[],null,["# Cassandra restore overview\n\n| You are currently viewing version 1.13 of the Apigee hybrid documentation. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis page provides an overview of restoring Cassandra in Apigee hybrid.\n\nWhy use restore?\n----------------\n\nYou can use [backups](/apigee/docs/hybrid/v1.13/cassandra-backup-overview) to restore Apigee infrastructure from the ground up in the event of\ncatastrophic failures, such as irrecoverable data loss in your Apigee hybrid instance from a disaster.\nRestoration takes your data from the backup location and restores the data into a new Cassandra\ncluster with the same number of nodes. No cluster data is taken from the old Cassandra cluster.\nThe goal of the restoration process is to bring an Apigee hybrid installation back to a\npreviously operational state using backup data from a snapshot.\n\nThe use of backups to restore is not recommended for the following scenarios:\n\n- Cassandra node failures.\n- Accidental deletion of data like `apps`, `developers`, and `api_credentials`.\n- One or more regions going down in a multi-region hybrid deployment.\n\nApigee Cassandra deployments and operational architecture take care of redundancy and fault tolerance for a single region.\nIn most cases, the recommended multi-region production implementation of hybrid means that a region failure can be recovered from\nanother live region using [region decommissioning and expansion procedures]()\ninstead of restoring from a backup.\n\nBefore you begin implementing a restore from a Cassandra backup, be aware of the following:\n\n- **Downtime:** There will be downtime for the duration of the restoration.\n- **Data loss:** There will be data loss between the last valid backup and the time the restoration is complete.\n- **Restoration time:** Restoration time depends on the size of the data and cluster.\n- **Cherry-picking data:** You cannot select only specific data to restore. Restoration restores the entire backup you select.\n\n| **Note:** When restoring an Apigee hybrid installation from backup, ensure that the backup file is created from the same hybrid version as the installation. For example, if you have a backup file created from Apigee hybrid 1.5.x, use it to restore only an Apigee hybrid 1.5.x installation. If there is a version mismatch between the backup file and the hybrid installation, the restoration might not work and Apigee does not support any issues that arise because of such restoration.\n\nMulti-region restores\n---------------------\n\nIf you installed Apigee hybrid into multiple regions, you must check the overrides file\nfor the region you are restoring to make sure the `cassandra:hostNetwork` is set\nto `false` before you perform the restoration. For more information, see\n[Restoring in multiple regions](./restore-cassandra-multi-region).\n\nPrerequisites\n-------------\n\n\nCheck all the following prerequisites are successful. Investigate any prerequisite failures before\nproceeding with restoration.\n\n1. Verify all Cassandra pods are up and running with the following command. \n\n ```\n kubectl get pods -n APIGEE_NAMESPACE -l app=apigee-cassandra\n ```\n\n\n Your output should look something like the following example: \n\n ```\n NAME READY STATUS RESTARTS AGE\n apigee-cassandra-default-0 1/1 Running 0 14m\n apigee-cassandra-default-1 1/1 Running 0 13m\n apigee-cassandra-default-2 1/1 Running 0 11m\n exampleuser@example hybrid-files %\n \n ```\n2. Verify the Cassandra statefulset shows all pods are running with the following command. \n\n ```\n kubectl get sts -n APIGEE_NAMESPACE -l app=apigee-cassandra\n ```\n\n\n Your output should look something like the following example: \n\n ```\n NAME READY AGE\n apigee-cassandra-default 3/3 15m\n \n ```\n3. Verify the ApigeeDatastore resource is in a *running* state with the following command. \n\n ```\n kubectl get apigeeds -n APIGEE_NAMESPACE\n ```\n\n\n Your output should look something like the following example: \n\n ```\n NAME STATE AGE\n default running 16m\n \n ```\n4. Verify all Cassandra PVCs are in *Bound* status with the following command. \n\n ```\n kubectl get pvc -n APIGEE_NAMESPACE -l app=apigee-cassandra\n ```\n\n\n Your output should look something like the following example: \n\n ```\n NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE\n cassandra-data-apigee-cassandra-default-0 Bound pvc-a14184e7-8745-4b30-8069-9d50642efe04 10Gi RWO standard-rwo 17m\n cassandra-data-apigee-cassandra-default-1 Bound pvc-ed129dcb-4706-4bad-a692-ac7c78bad64d 10Gi RWO standard-rwo 15m\n cassandra-data-apigee-cassandra-default-2 Bound pvc-faed0ad1-9019-4def-adcd-05e7e8bb8279 10Gi RWO standard-rwo 13m\n \n ```\n5. Verify all Cassandra PVs are in Bound status with the following command. \n\n ```\n kubectl get pv -n APIGEE_NAMESPACE\n ```\n\n\n Your output should look something like the following example: \n\n ```\n NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE\n pvc-a14184e7-8745-4b30-8069-9d50642efe04 10Gi RWO Delete Bound apigee/cassandra-data-apigee-cassandra-default-0 standard-rwo 17m\n pvc-ed129dcb-4706-4bad-a692-ac7c78bad64d 10Gi RWO Delete Bound apigee/cassandra-data-apigee-cassandra-default-1 standard-rwo 16m\n pvc-faed0ad1-9019-4def-adcd-05e7e8bb8279 10Gi RWO Delete Bound apigee/cassandra-data-apigee-cassandra-default-2 standard-rwo 14m\n \n ```\n6. Verify the Apigee Controller resource is in Running status with the following command. \n\n ```\n kubectl get pods -n APIGEE_NAMESPACE-system -l app=apigee-controller\n ```\n\n\n Your output should look something like the following example: \n\n ```\n NAME READY STATUS RESTARTS AGE\n apigee-controller-manager-856d9bb7cb-cfvd7 2/2 Running 0 20m\n \n ```\n\nHow to restore?\n---------------\n\nCassandra's restoration steps differ slightly depending on whether your Apigee hybrid is\ndeployed in a single region or multiple regions. For the detailed restoration steps,\nsee the following documentation:\n\n- [Restoring in a single region](/apigee/docs/hybrid/v1.13/restore-cassandra-single-region)\n- [Restoring in a multi-region](/apigee/docs/hybrid/v1.13/restore-cassandra-multi-region)"]]