Nesta página, descrevemos como restaurar o Cassandra em uma única região.
Em uma implantação de região única, a Apigee híbrida é implantada em um único data center ou região. Se
você tiver várias organizações da Apigee na implantação, o processo de restauração vai restaurar dados para todas as organizações.
Em uma configuração de várias organizações, não é possível restaurar uma organização específica.
Como restaurar uma região de um backup
Na sua configuração, o backup do Cassandra pode residir no Cloud Storage ou em um servidor remoto. Nos dois casos, execute as seguintes etapas para restaurar:
Verifique a versão híbrida.
apigeectl version
Verifique se a versão é a mesma que criou os arquivos de backup no armazenamento.
Confirme se o cluster do Kubernetes que você está restaurando não tem uma instalação híbrida da Apigee anterior. Se você estiver restaurando para o cluster já existente, use os seguintes comandos para excluir a instalação atual da Apigee híbrida:
apigeectl delete -f overrides.yamlkubectl -n apigee get apigeedatastore,apigeeredis,apigeetelemetry,org,env,arc # The output should be empty.apigeectl delete --all -f overrides.yaml
Abra o arquivo overrides.yaml e defina as
propriedades restore para os valores desejados:
Crie uma nova implantação híbrida de ambiente de execução. Isso criará um novo cluster do Cassandra e começará
a restaurar os dados de backup no cluster:
Verifique o progresso do job de restauração e confirme se apigeeds e todos os outros pods estão ativos:
Para verificar:apigeeds
kubectl get apigeeds -n apigee
Para verificar todos os outros pods, faça o seguinte:
kubectl get pods -n apigee
Após a conclusão bem-sucedida da restauração e da confirmação de que os componentes do ambiente de execução estão íntegros,
recomendamos que você configure um backup no cluster:
Remova a configuração restore do arquivo overrides-restore.yaml.
Adicione a configuração backup ao arquivo overrides-restore.yaml.
Aplique a configuração backup com o seguinte comando:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 UTC."],[[["\u003cp\u003eThis document guides users through restoring Cassandra in a single-region Apigee hybrid deployment, which applies to restoring data for all organizations in multi-organization setups, as a specific organization cannot be restored individually.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting the restore process, users should determine if they need to retain the existing setup for troubleshooting, which involves deleting \u003ccode\u003eorg\u003c/code\u003e and \u003ccode\u003eenv\u003c/code\u003e components while retaining the cluster and then restoring Cassandra in a new cluster.\u003c/p\u003e\n"],["\u003cp\u003eThe restore process involves setting the \u003ccode\u003erestore\u003c/code\u003e properties in the \u003ccode\u003eoverrides.yaml\u003c/code\u003e file, where Cassandra backups can be restored from Cloud Storage or a remote server, ensuring the \u003ccode\u003erestore:enabled\u003c/code\u003e property is set to \u003ccode\u003etrue\u003c/code\u003e and all other properties are correctly configured depending on the selected method.\u003c/p\u003e\n"],["\u003cp\u003eAfter configuring the \u003ccode\u003eoverrides.yaml\u003c/code\u003e file, a new hybrid runtime deployment must be created using \u003ccode\u003eapigeectl init\u003c/code\u003e, followed by \u003ccode\u003eapigeectl check-ready\u003c/code\u003e and \u003ccode\u003eapigeectl apply\u003c/code\u003e with the \u003ccode\u003e--restore\u003c/code\u003e flag, then using \u003ccode\u003eapigeectl check-ready\u003c/code\u003e again to ensure a successful restore.\u003c/p\u003e\n"],["\u003cp\u003ePost-restoration, it is recommended to remove the \u003ccode\u003erestore\u003c/code\u003e configuration from the overrides file, add the \u003ccode\u003ebackup\u003c/code\u003e configuration, and then apply the \u003ccode\u003ebackup\u003c/code\u003e configuration using the \u003ccode\u003eapigeectl apply\u003c/code\u003e command to ensure regular backups are implemented.\u003c/p\u003e\n"]]],[],null,["# Restoring in a single region\n\n| You are currently viewing version 1.7 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis page describes how to restore Cassandra in a single region.\n\nIn a single region deployment, Apigee hybrid is deployed in a single data center or a region. If you\nhave multiple Apigee organizations in your deployment, the restore process restores data for all the organizations.\nIn a multi-organization setup, you cannot restore a specific organization.\n| **Note** : Before you begin restoring a single region, consider whether the following prerequisite steps are applicable:\n|\n| - 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 then 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| - If your hybrid installation was set up with multiple organizations, get the overrides files for each organization before proceeding with restore in a single region. You can add the restore configuration as described in [Step 3](#step3) to any **one** of the overrides files. Do not add the restore configuration to any other overrides file.\n\nRestoring a region from a backup\n--------------------------------\n\nIn your configuration, the Cassandra backup can reside either on Cloud Storage or\non a remote server. In either case, perform the following steps to restore:\n\n1. Verify the hybrid version. \n\n ```\n apigeectl version\n ```\n Ensure the version is the same version that created the backup files in storage. **Tip:** Run every `apigeectl` command with the `--dry-run=true` flag first to check for any apigeectl errors.\n2. Confirm that the Kubernetes cluster you are restoring to does not have a prior Apigee hybrid installation. If you are restoring to the existing cluster, use the following commands to delete the existing Apigee hybrid installation: \n\n apigeectl delete -f overrides.yaml\n kubectl -n apigee get apigeedatastore,apigeeredis,apigeetelemetry,org,env,arc # The output should be empty.\n apigeectl delete --all -f overrides.yaml\n\n3. Open your `overrides.yaml` file and set the `restore` properties to the desired values: \n\n ### Cloud Storage\n\n ### Parameters\n\n ```actionscript-3\n namespace: YOUR_RESTORE_NAMESPACE # Use the namespace as in your original cluster.\n cassandra:\n hostNetwork: false\n ...\n restore:\n enabled: true\n serviceAccountPath: \"\u003cvar translate=\"no\"\u003eSA_JSON_FILE_PATH\u003c/var\u003e\"\n dbStorageBucket: \"\u003cvar translate=\"no\"\u003eCLOUD_STORAGE_BUCKET_PATH\u003c/var\u003e\"\n cloudProvider: \"GCP\" # required verbatim \"GCP\" (all caps)\n snapshotTimestamp: \"\u003cvar translate=\"no\"\u003eTIMESTAMP\u003c/var\u003e\"\n ...\n backup:\n enabled: true\n serviceAccountPath: \"\u003cvar translate=\"no\"\u003eSA_JSON_FILE_PATH\u003c/var\u003e\"\n dbStorageBucket: \"\u003cvar translate=\"no\"\u003eCLOUD_STORAGE_BUCKET_PATH\u003c/var\u003e\"\n cloudProvider: \"GCP\" # required verbatim \"GCP\" (all caps)\n schedule: \"\u003cvar translate=\"no\"\u003eSCHEDULE\u003c/var\u003e\"\n ```\n\n ### Example\n\n ```actionscript-3\n namespace: apigee\n cassandra:\n hostNetwork: false\n ...\n restore:\n enabled: true\n serviceAccountPath: \"/Users/myhome/.ssh/my_cassandra_backup.json\"\n dbStorageBucket: \"gs://myname-cassandra-backup\"\n cloudProvider: \"GCP\"\n snapshotTimestamp: \"20201001183903\"\n ...\n backup:\n enabled: true\n serviceAccountPath: \"/Users/myhome/.ssh/my_cassandra_backup.json\"\n dbStorageBucket: \"gs://myname-cassandra-backup\"\n cloudProvider: \"GCP\"\n schedule: \"0 2 * * *\"\n ...\n ```\n\n\n Where:\n\n ### Non-Cloud Storage\n\n ### Parameters\n\n ```actionscript-3\n namespace: YOUR_RESTORE_NAMESPACE # Use the namespace as in your original cluster.\n cassandra:\n hostNetwork: false\n ...\n restore:\n enabled: true\n keyFile: \"\u003cvar translate=\"no\"\u003ePATH_TO_PRIVATE_KEY_FILE\u003c/var\u003e\"\n server: \"\u003cvar translate=\"no\"\u003eBACKUP_SERVER_IP\u003c/var\u003e\"\n storageDirectory: \"/home/apigee/\u003cvar translate=\"no\"\u003eBACKUP_DIRECTORY\u003c/var\u003e\"\n cloudProvider: \"HYBRID\" # required verbatim \"HYBRID\" (all caps)\n snapshotTimestamp: \"\u003cvar translate=\"no\"\u003eTIMESTAMP\u003c/var\u003e\"\n ...\n backup:\n enabled: true\n keyFile: \"\u003cvar translate=\"no\"\u003ePATH_TO_PRIVATE_KEY_FILE\u003c/var\u003e\"\n server: \"\u003cvar translate=\"no\"\u003eBACKUP_SERVER_IP\u003c/var\u003e\"\n storageDirectory: \"/home/apigee/\u003cvar translate=\"no\"\u003eBACKUP_DIRECTORY\u003c/var\u003e\"\n cloudProvider: \"HYBRID\" # required verbatim \"HYBRID\" (all caps)\n schedule: \"\u003cvar translate=\"no\"\u003eSCHEDULE\u003c/var\u003e\"\n ```\n\n ### Example\n\n ```actionscript-3\n namespace: apigee\n cassandra:\n hostNetwork: false\n ...\n restore:\n enabled: true\n keyFile: \"/Users/exampleuser/apigee-hybrid/hybrid-files/service-accounts/private.key\"\n server: \"34.56.78.90\"\n storageDirectory: \"/home/apigee/cassbackup\"\n cloudProvider: \"HYBRID\"\n snapshotTimestamp: \"20201001183903\"\n ...\n backup:\n enabled: true\n keyFile: \"/Users/exampleuser/apigee-hybrid/hybrid-files/service-accounts/private.key\"\n server: \"34.56.78.90\"\n storageDirectory: \"/home/apigee/cassbackup\"\n cloudProvider: \"HYBRID\"\n schedule: \"0 2 * * *\"\n ...\n ```\n\n\n Where:\n\n | **Note:** Apigee restores Cassandra from a Cloud Storage backup or a remote server backup based on the `backup` configuration in the `overrides.yaml` file.\n4. Create a new hybrid runtime deployment. This will create a new Cassandra cluster and begin restoring the backup data into the cluster: \n\n ```\n ${APIGEECTL_HOME}/apigeectl init -f overrides/overrides.yaml\n ``` \n\n ```\n ${APIGEECTL_HOME}/apigeectl check-ready -f overrides/overrides.yaml\n ``` \n\n ```\n ${APIGEECTL_HOME}/apigeectl apply -f overrides/overrides.yaml --restore\n ``` \n\n ```\n ${APIGEECTL_HOME}/apigeectl check-ready -f overrides/overrides.yaml\n ```\n5. Verify the restoration job progress and confirm that `apigeeds` and all the other pods are up:\n - To check `apigeeds`: \n\n ```\n kubectl get apigeeds -n apigee\n ```\n - To check all other pods: \n\n ```\n kubectl get pods -n apigee\n ```\n\nUpon successful completion of the restore and confirmation that the runtime components are healthy,\nwe recommend configuring a backup on the cluster:\n\n1. Remove the `restore` configuration from the `overrides-restore.yaml` file.\n2. Add the `backup` configuration to the `overrides-restore.yaml` file.\n3. Apply the `backup` configuration with the following command: \n\n ```\n ./apigeectl apply -f ../overrides-restore.yaml\n ```"]]