> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Service backups<!-- --><!-- --><!-- -->

Learn how Aiven backs up your services automatically, where backups are stored, and how to change your backup schedule.

All Aiven services, except for Aiven for Apache Kafka®, have automatic encrypted backups.

Backups are stored in the object storage of the cloud region where the service is created, for example, S3 for AWS or Google Cloud Storage for Google Cloud.

note

If you change a service's cloud provider or an availability zone, its backups are not migrated from their original location.

Whenever a service is powered on from a powered-off state, the latest available backup is automatically restored.

Backups are automatically deleted 30 days after the service's deletion date.

## Access to backups[​](#access-to-backups "Direct link to Access to backups")

Backups are encrypted and not available for download, but you can create your own backups with the appropriate tooling:

* [PostgreSQL®](https://www.postgresql.org/docs/current/app-pgdump.html): `pgdump`
* [MySQL®](https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html): `mysqldump`
* [OpenSearch®](https://github.com/elasticsearch-dump/elasticsearch-dump): `elasticdump`
* [Valkey™](https://valkey.io/topics/cli/): `valkey-cli`

## Edit the backup schedule[​](#edit-the-backup-schedule "Direct link to Edit the backup schedule")

To edit the backup schedule for your service:

* Console
* Aiven API
* Aiven CLI
* Terraform

1. In your service,
   <!-- -->
   click **Backups**.
2. Click **Actions** > **Configure backup settings**.
3. Click **Add configuration options**.
4. Add `backup_hour` and `backup_minute`, and set their values.
5. Click **Save configuration**.

Call the [ServiceUpdate](https://api.aiven.io/doc/#tag/Service/operation/ServiceUpdate) endpoint, and add the following properties to the `user_config` object:

```
curl --request PUT                                                        \

  --url https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME \

  --header 'Authorization: Bearer YOUR_BEARER_TOKEN'                      \

  --header 'content-type: application/json'                               \

  --data '{

      "user_config": {

          "backup_hour": BACKUP_HOUR,

          "backup_minute": BACKUP_MINUTE

      }

  }'
```

Replace the following:

* `SERVICE_NAME`: the name of your service.
* `PROJECT_NAME`: the name of your project.
* `BACKUP_HOUR`: the hour when the service backup starts. Accepted values are integers between `0` and `23`.
* `BACKUP_MINUTE`: the minute when the service backup starts. Accepted values are integers between `0` and `59`.

Run the [avn service update](https://aiven.io/docs/tools/cli/service-cli.md#avn-cli-service-update) command, and add the following properties to the `user_config` object:

```
avn service update SERVICE_NAME \

  --project PROJECT_NAME        \

  --user-config '{

      "backup_hour": BACKUP_HOUR,

      "backup_minute": BACKUP_MINUTE

  }'
```

Replace the following:

* `SERVICE_NAME`: the name of your service.
* `PROJECT_NAME`: the name of your project.
* `BACKUP_HOUR`: the hour when the service backup starts. Accepted values are integers between `0` and `23`.
* `BACKUP_MINUTE`: the minute when the service backup starts. Accepted values are integers between `0` and `59`.

Use the `backup_hour` and `backup_minute` attributes in [your service resource](https://registry.terraform.io/providers/aiven/aiven/latest/docs) to set the start time for backups.

If a backup was recently made, it can take another backup cycle before the new backup time takes effect.

Related pages

* [Track service restore progress using the API](https://aiven.io/docs/platform/howto/restore_progress_updates.md)
* [Backup to another region](https://aiven.io/docs/platform/concepts/backup-to-another-region.md)
