Any usage where backups are being exported to a different region in the same cloud provider will incur data transfer charges.Cross-Cloud backups are only supported via the backup/restore commands outlined on this page, and not via the UI.
Requirements
Before you run aBACKUP command, make sure your ClickHouse user has the BACKUP privilege. The default_role in ClickHouse Cloud doesn’t include this privilege. Contact ClickHouse Support to request it before exporting backups.
You will need the following details to export/restore backups to your own CSP storage bucket.
AWS
- AWS S3 endpoint, in the format:
testchbackupsis the name of the S3 bucket to export backups to.backupsis an optional subdirectory.
- AWS access key and secret. AWS role based authentication is also supported and can be used in place of AWS access key and secret.
Azure
- Azure storage connection string.
- Azure container name in the storage account.
- Azure Blob within the container.
Google Cloud Storage (GCS)
-
GCS endpoint, in the format:
- Access HMAC key and HMAC secret.
Backup / Restore
Backup / Restore to AWS S3 Bucket
Take a DB backup
Full Backupuuid is a unique identifier, used to differentiate a set of backups.
You will need to use a different UUID for each new backup in this subdirectory, otherwise you will get a
BACKUP_ALREADY_EXISTS error.
For example, if you’re taking daily backups, you will need to use a new UUID each day.Restore from a backup
Backup / Restore to Azure Blob Storage
Take a DB backup
Full Backupuuid is a unique identifier, used to differentiate a set of backups.
Incremental Backup
Restore from a backup
Backup / Restore to Google Cloud Storage (GCS)
Take a DB backup
Full Backupuuid is a unique identifier, used to differentiate a set of backups.
Incremental Backup