Scheduling backups in Cloud Storage Stay organized with collections Save and categorize content based on your preferences.
This page describes how to schedule backups for Cassandra in Cloud Storage. In this method, backups are stored in the specified Cloud Storage bucket.
Note: After applying the backup configuration on the existing cluster, the Cassandra pods will restart one after another (rolling restart) from last to first.To schedule Cassandra backups, perform the following steps:
- Run the following
create-service-accountcommand to create a Google Cloud service account (SA) with the standardroles/storage.objectAdminrole. This SA role allows you to write backup data to Cloud Storage. Execute the command in the$APIGEE_HELM_CHARTS_HOME/apigee-operator/etc/directory../tools/create-service-account --env non-prod --dir ./
This command creates a single service account named
Note: If you prefer to create all the individual service accounts for a production environment, use the following command:apigee-non-prodfor use in non-production environments and places the downloaded key file in the./directory../tools/create-service-account--env prod --dir ./
Then, move each service account into its corresponding chart directory. The following table lists each service account and the corresponding Apigee hybrid Helm charts:
Service account Apigee Helm chart apigee-cassandraapigee-datastoreapigee-loggerapigee-telemetryapigee-martapigee-orgapigee-metricsapigee-telemetryapigee-runtimeapigee-envapigee-synchronizerapigee-envapigee-udcaapigee-orgapigee-watcherapigee-orgFor more information about Google Cloud service accounts, seeCreating and managing service accounts.
- The
create-service-accountcommand saves a JSON file containing the service account private key. The file is saved in the same directory where the command executes. You will need the path to this file in the following steps. - Create a Cloud Storage bucket. Specify a reasonable data retention policy for the bucket. Apigee recommends a data retention policy of 15 days.
- Open your
overrides.yamlfile. - Add the following
cassandra.backupproperties to enable backup. Do not remove any of the properties that are already configured.Parameters
cassandra: ... backup: enabled: true serviceAccountPath:SA_JSON_FILE_PATH dbStorageBucket:CLOUD_STORAGE_BUCKET_NAME schedule:BACKUP_SCHEDULE_CODE cloudProvider: "GCP" # For remote server backup set this to HYBRID (all caps) ...
Example
...cassandra:storage:type:gcepdcapacity:50Gigcepd:replicationType:regional-pdauth:default:password:"abc123"admin:password:"abc234"ddl:password:"abc345"dml:password:"abc456"nodeSelector:key:cloud.google.com/gke-nodepoolvalue:apigee-databackup:enabled:trueserviceAccountPath:"my-cassandra-backup-sa.json"dbStorageBucket:"myname-cassandra-backup"schedule:"45 23 * * 6"cloudProvider:"GCP"...
Where: - Apply the configuration changes to the new cluster. For example:
Note: If you see an error sayinghelm upgrade datastore apigee-datastore/ \ --namespaceAPIGEE_NAMESPACE \ --atomic \ -fOVERRIDES_FILE.yaml
Error: UPGRADE FAILED: "datastore" has no deployed releases, replaceupgradewithinstalland try the command again.WhereOVERRIDES_FILE is the path to the overrides file you just edited.
- Verify the backup job. For example:
kubectl get cronjob -nAPIGEE_NAMESPACE
NAMESCHEDULESUSPENDACTIVELASTSCHEDULEAGEapigee-cassandra-backup33****False0 <none>94s
| Property | Description |
|---|---|
backup:enabled | Backup is disabled by default. You must set this property totrue. |
backup:serviceAccountPath | SA_JSON_FILE_PATH The path on your filesystem to the service account JSON file that was downloaded when you ran the The path must be relative to the apigee-datastore chart directory. For example, |
backup:dbStorageBucket | CLOUD_STORAGE_BUCKET_NAME The name of an existing Google Cloud Storage bucket that will be used to store backup archives. See Creating buckets if you need to create one. Note: Starting in Hybrid version 1.13, the bucket name doesn't need to be prefixed withgs://. Support for this prefix has been deprecated and will be removed in future releases. |
backup:cloudProvider |
For a Cloud Storage backup, set the property to For a remote server backup, set the property to |
backup:schedule | BACKUP_SCHEDULE_CODE The time when the backup starts, specified instandard crontab syntax. Default: |
Launch a manual backup
Cassandra backups generate automatically according to the cron schedule set in theoverrides.yaml file.
To initiate a manual backup, use this command:
kubectl create job -nAPIGEE_NAMESPACE --from=cronjob/apigee-cassandra-backupBACKUP_POD_NAME
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.