Download Aiven for InfluxDB data backup
Download a backup of your Aiven for InfluxDB service data by requesting a backup. This creates a snapshot of your latest data, ready for download.
Prerequisites
Before you download a backup, make sure you have the following:
- Aiven API token with the necessary permissions
- Aiven CLI
If your InfluxDB service is in a Virtual Private Cloud (VPC) or if you need specific network access to your backup, confirm that the correct access settings are enabled. Based on your network setup, enable one of the following settings:
public_access.user_backup
: Allows access to backups from the public internetprivate_access.user_backup
: Allows access to backups within a private networkprivatelink_access.user_backup
: Allows access to backups via a private link
To configure access:
- Go to the service's Overview page.
- Click Service settings, then go to Cloud and network.
- Click the Actions menu and select More network configurations.
- Click Add configuration options.
- In the search field, enter the access setting to enable. For example,
private_access.user_backup
. - Select the value to Enabled.
- Click Save configuration.
Backup format
The backup created is in a portable format that includes all databases and retention
policies from your Aiven for InfluxDB service. This backup is packaged as a single .tar
file for easy storage and transfer. For more information, see the
InfluxDB backup and restore documentation.
Download data
- Aiven Console
- Aiven API
- Aiven CLI
-
Log in to the Aiven Console, select your project, and choose your Aiven for InfluxDB service.
-
On the service's Overview page, click Service settings.
-
In the Service management section, click Actions > Download data.
-
In the Download InfluxDB data window, review the details and enter a name in the Backup name field. Use only letters, numbers, and the characters
.:_+-
without spaces or parentheses. -
Click Request backup to create a backup of your latest data.
noteThe duration of the backup process varies based on the size of your data. For larger instances, it may take several hours. Requesting a new backup will replace any existing backup, so download any existing backup you need before creating a new one.
-
After the backup is created, copy the Service URI to access the backup files directly. Paste the URI into your browser to download your backup.
Alternatively, you can also request a download from the Backups section:
- Go to the service's Overview page and click Backups.
- Click the Actions > Download backup.
- In the Download InfluxDB data window, review the details and enter a name in the Backup name field.
- Click Request backup to create a backup of your latest data.
-
Create a backup using the Aiven API by specifying
create_user_backup
as the task type.curl -X POST "https://api.aiven.io/v1/project/<project_name>/service/<service_name>/task" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"task_type": "create_user_backup",
"create_user_backup": {
"backup_name": "my-influxdb-backup"
}
}'Parameters:
project_name
: Your project name.service_name
: Your service name.api_token
: Your API authentication token.
-
Get the
user_backup_uri
from your service connection information by using the Aiven API endpoint:curl -X GET "https://api.aiven.io/v1/project/<project_name>/service/<service_name>" \
-H "Authorization: Bearer <API_TOKEN>" -
Download the backup using the following Service URI format:
<user_backup_uri>/<backup_name>.tar
Adjust the Service URI based on your network configuration:
- Public access: If your service is in a VPC configured for public access, add
the prefix
public-
to the Service URI. - Private access: Use the Service URI as provided, without any prefix. Ensure that
the
private_access.user_backup
setting is enabled in your service's network configuration.
- Public access: If your service is in a VPC configured for public access, add
the prefix
-
Create a backup by running the following command:
avn service task-create <service_name> \
--task-type create_user_backup \
--backup-name <backup_name>Replace
<service_name>
with your Aiven for InfluxDB service name and<backup_name>
with a descriptive name for the backup. -
To download the backup, use the following URI format:
<user_backup_uri>/<backup_name>.tar
Adjust the URI based on your network settings:
- Public access: For a service in a VPC configured for public access, add the
prefix
public-
to the URI. - Private access: Use the URI as is if private access is enabled. Ensure that
the private access setting,
private_access.user_backup
, is enabled in your service configuration.
- Public access: For a service in a VPC configured for public access, add the
prefix