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
Escolha as instruções abaixo para a ferramenta de gerenciamento que você usa para a Apigee híbrida:
Verifique o progresso do job de restauração e confirme se apigeeds e todos os outros pods estão ativos:
Verificar apigeeds:
kubectl get apigeeds -n apigee
Verifique todos os outros pods:
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 documentation guides users through restoring Cassandra in a single-region Apigee hybrid deployment, which involves restoring data for all organizations within the setup.\u003c/p\u003e\n"],["\u003cp\u003eBefore restoring, users should decide whether to preserve the existing cluster for troubleshooting or start with a new cluster, and should collect overrides files for each organization if multiple organizations are present.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves updating the \u003ccode\u003eoverrides.yaml\u003c/code\u003e file with Cassandra restore details, including enabling restore, specifying the service account path, storage bucket, cloud provider, and snapshot timestamp, while ensuring backups are disabled.\u003c/p\u003e\n"],["\u003cp\u003eUsers can restore using either Helm or \u003ccode\u003eapigeectl\u003c/code\u003e, and the method will vary if the backup is on Cloud Storage or a non-Cloud Storage, requiring different sets of configuration parameters.\u003c/p\u003e\n"],["\u003cp\u003eAfter restoring, it's crucial to verify the restoration job's progress, confirm that all necessary pods are up, remove the restore configuration, add the backup configuration to the overrides file, and apply the backup configuration.\u003c/p\u003e\n"]]],[],null,["# Restoring in a single region\n\n| You are currently viewing version 1.11 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\nChoose the instructions below for the management tool you are using for Apigee hybrid:\n\n### Helm\n\n1. Update the Cassandra restore details in the `overrides.yaml` file:\n\n ```actionscript-3\n namespace: YOUR_RESTORE_NAMESPACE # Use the same 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: false\n ...\n ```\n\n\n Where:\n\n | **Note:** In case you are using **CSI backup** , please follow the **example restore config** in the [CSI backup and restore](/apigee/docs/hybrid/v1.11/cassandra-csi-backup-restore#example-restore-config) documentation.\n2. In case you do not have a clean cluster to start out with, follow the\n [Decommission a hybrid region for helm](/apigee/docs/hybrid/v1.11/decommission-region#helm)\n documentation to bring your existing Hybrid installation into a clean state\n (you can leave the **Cert Manager** installed). This would bring you to an equal state\n as if you would have followed [Helm runtime setup manual](/apigee/docs/hybrid/v1.11/helm-install-create-cluster)\n until the beginning of Step 11.\n\n3. Verify there are no pods remaining in the Apigee namespaces:\n\n kubectl get pods -n apigee\n kubectl get pods -n apigee-system\n\n4. If you are using CSI backup, make sure that you can see\n the volumesnapshots you want to use for the restoration process by running:\n\n ```\n kubectl get volumesnapshot -n apigee\n \n ```\n5. Install all Hybrid components one by one as described in\n [Step 11](/apigee/docs/hybrid/v1.11/helm-install-helm-charts) on the\n installation manual. Note that the `apigee-cassandra-restore` pod will get\n created once you run the command to install the `datastore`, but it will only\n go into `running` state after you install the `apigee-org` component.\n\n | **Important:** Omit the `‑‑atomic` flag for all `upgrade` commands for [migrated clusters](/apigee/docs/hybrid/v1.11/helm-migration).\n\nSee [Cassandra backup overview](/apigee/docs/hybrid/v1.11/cassandra-backup-overview) for more details on Cassandra backup and restore.\n\n### `apigeectl`\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 same 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: false\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: false\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 same 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: false\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: false\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 ```\n\nVerify the restoration job progress and confirm that `apigeeds` and all the other pods are up:\n\n1. Check `apigeeds`: \n\n ```\n kubectl get apigeeds -n apigee\n ```\n2. 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 ### Helm\n\n ```\n helm upgrade datastore apigee-datastore/ \\\n --install \\\n --namespace apigee \\\n --atomic \\\n -f overrides.yaml\n ```\n\n ### `apigeectl`\n\n ```\n ./apigeectl apply -f ../overrides.yaml\n ```"]]