Schedule Aiven for ClickHouse® backups
Set the time when backups are taken for your Aiven for ClickHouse® service.
Prerequisites
- To configure backup time, one of the following tools:
- To reset or delete configured backup settings, one of the following tools:
- At least one Aiven for ClickHouse service backup to be configured
Configure backup time
A backup process can only start when the previous backup process completes.
To edit the backup schedule for your service:
- Console
- Aiven API
- Aiven CLI
- Terraform
- In your service, click Backups.
- Click Actions > Configure backup settings.
- Click Add configuration options.
- Add
backup_hourandbackup_minute, and set their values. - Click Save configuration.
Call the 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 between0and23.BACKUP_MINUTE: the minute when the service backup starts. Accepted values are integers between0and59.
Run the avn 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 between0and23.BACKUP_MINUTE: the minute when the service backup starts. Accepted values are integers between0and59.
Use the backup_hour and backup_minute attributes in
your service resource
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.
Restore defaults
- Console
- Aiven API
- Aiven CLI
The Aiven Console doesn't support restoring defaults. Use the Aiven API or CLI.
Call the ServiceUpdate
endpoint, and set the backup scheduling parameters to null or remove them from
user_config. Replace placeholders SERVICE_NAME and PROJECT_NAME with meaningful values.
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": null,
"backup_minute": null
}
}'
Run the avn service update command,
and set the backup scheduling parameters to null or remove them from user_config.
Replace placeholders SERVICE_NAME and PROJECT_NAME with meaningful values.
avn service update SERVICE_NAME \
--project PROJECT_NAME \
--user-config '{
"backup_hour": null,
"backup_minute": null
}'
Related pages