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 includes restoring data for all organizations in a multi-organization setup, as restoring data for a single organization is not supported.\u003c/p\u003e\n"],["\u003cp\u003eBefore restoring, you may need to delete \u003ccode\u003eorg\u003c/code\u003e and \u003ccode\u003eenv\u003c/code\u003e components from the Kubernetes cluster while keeping the Apigee controller, or obtain override files for each organization in a multi-organization setup, adding restore configurations to only one file.\u003c/p\u003e\n"],["\u003cp\u003eTo restore from a backup, you will need to ensure that the Apigee version is the same as the one that created the backup, confirm the target Kubernetes cluster is new or has the old Apigee installation removed, and configure restore parameters in the \u003ccode\u003eoverrides.yaml\u003c/code\u003e file, specifying either Cloud Storage or non-Cloud Storage (remote server) details.\u003c/p\u003e\n"],["\u003cp\u003eAfter configuring the restore properties in \u003ccode\u003eoverrides.yaml\u003c/code\u003e, a new hybrid runtime deployment must be created using \u003ccode\u003eapigeectl\u003c/code\u003e commands to initiate the restore, and then you can verify the success of the restoration process by checking the status of \u003ccode\u003eapigeeds\u003c/code\u003e and other pods.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful completion of the restore, you should remove the restore configurations in the overrides file, and add the backup configuration, then apply the configuration in order to re-enable backups.\u003c/p\u003e\n"]]],[],null,["# Restoring in a single region\n\n| You are currently viewing version 1.10 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 ...\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 ```scdoc\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: \"PATH_TO_PRIVATE_KEY_FILE\"\n server: \"BACKUP_SERVER_IP\"\n storageDirectory: \"/home/apigee/BACKUP_DIRECTORY\"\n cloudProvider: \"HYBRID\" # required verbatim \"HYBRID\" (all caps)\n snapshotTimestamp: \"TIMESTAMP\"\n ...\n backup:\n enabled: true\n keyFile: \"PATH_TO_PRIVATE_KEY_FILE\"\n server: \"BACKUP_SERVER_IP\"\n storageDirectory: \"/home/apigee/BACKUP_DIRECTORY\"\n cloudProvider: \"HYBRID\" # required verbatim \"HYBRID\" (all caps)\n schedule: \"SCHEDULE\"\n \n ```\n\n ### Example\n\n ```scdoc\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 ```"]]