Skip to main content

Add a backup to another region Limited availabilty

Enable the backup to another region (BTAR) feature and create an additional cross-region service backup on top of a regular backup stored in the region where your service is hosted.

important

BTAR is supported for Aiven for MySQL® and Aiven for PostgreSQL®.

To add an additional service backup for your service, you can use the Aiven Console, CLI, or API.

Prerequisites

  • This feature is in limited availability. Enable it by contacting your account team.

  • Make sure you have at least one running Aiven for MySQL® or Aiven for PostgreSQL® service.

  • Depending on your preferred tool to manage BTAR with, make sure you can access or use:

Back up to another region via console

  1. Log in to the Aiven Console.

  2. From the Services view, select an Aiven service on which you'd like to enable BTAR.

  3. On your service's page, select Backups from the sidebar.

  4. On the Backups page, select the actions (...) menu > Secondary backup location.

  5. In the Secondary backup location window, use the Secondary location menu to select a region for your additional backup. Confirm your choice by selecting Enable.

    tip

    For names of the cloud regions supported in Aiven, see column Cloud in List of available cloud regions.

Your new additional backup is now visible on your service's Backups page in the Secondary backup location column.

Back up to another region with CLI

Using the Aiven CLI client, you can enable BTAR for

additional_backup_regions

To enable BTAR on an Aiven service, add the additional_backup_regions parameter to relevant commands.

Create a service with BTAR via CLI

Use the avn service create command to create a service. Include additional_backup_regions as a parameter to the command and set its value to the name of the desired cloud region.

avn service create                                            \
--service-type service_type_name \
--cloud cloud_region_name \
--plan service_plan_name \
-c additional_backup_regions=\[\"name_of_cloud_region\"\] \
new_service_name

Enable BTAR on an existing service via CLI

Use the avn service update command to configure your service so that it supports BTAR. Include additional_backup_regions as a parameter to the command and set its value to the name of desired cloud region.

avn service update name_of_existing_service         \
-c additional_backup_regions=[\"name_of_cloud_region\"]

Back up to another region with API

Using Aiven APIs, you can enable BTAR for:

additional_backup_regions

To enable BTAR on an Aiven service, include the additional_backup_regions parameter in relevant calls.

Create a service with BTAR via API

Use the ServiceCreate API to create a service with BTAR enabled. When constructing the API request, add the user_config object to the request body and nest the additional_backup_regions field inside.

curl --request POST                                                    \
--url https://api.aiven.io/v1/project/YOUR_PROJECT_NAME/service \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data
'{
"cloud": "string",
"plan": "string",
"service_name": "service_2_name",
"service_type": "cassandra",
"user_config": {
"additional_backup_regions": ["cloud-region-name"]
}
}'

Enable BTAR on an existing service via API

Use the ServiceUpdate API to configure your existing service so that it supports BTAR. When constructing the API request, add the user_config object to the request body and nest the additional_backup_regions field inside. Set the value of the additional_backup_regions parameter to the name of desired cloud region.

curl --request PUT                                                                       \
--url https://api.aiven.io/v1/project/YOUR_PROJECT_NAME/service/YOUR_SERVICE_NAME \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data
'{
"user_config": {
"additional_backup_regions": ["cloud-region-name"]
}
}'