Manage ClickHouse® backups
Warning
At the moment, you can create backups only for specific ClickHouse® shards. The functionality that allows creating a single backup for all shards within a cluster is currently under development.
Manually create a backup
-
Go to the Clusters overview
-
Select the cluster you want to create a backup for and click it.
-
Go to the Backups tab.
-
Click Create backup.
-
Name your backup and click Submit. ClickHouse® service automatically creates a separate backup for each shard in the cluster.
Note
Managed Service for ClickHouse® creates backups automatically every day at approximately 1 a.m., according to your timezone.
Restore shards from backups
-
Go to the Clusters overview
-
Select the cluster whose shards you want to restore and click on it.
-
Go to the Backups tab.
-
Select a shard you want to restore a backup from.
-
Click
-
Follow the steps from the Create a cluster page to add a new cluster for your backup copy.
Warning
Currently, you can't use an existing cluster to store your data after you restore this data from a backup. Create a new cluster for this purpose and redefine its Service, Provider, Region and Resources settings.
To restore a ClickHouse® cluster from a backup, use the ClusterService
restore method with the following parameters:
-
project_id
- the ID of your project. You can get this value on your project's information page. -
backup_id
- the ID of the backup from which you want to restore the cluster. To get this id, use theBackupService
list method withproject_id
parameter. -
region_id
- for the list of available regions and their region codes, see Areas and regions for Managed Service for ClickHouse®. -
name
- your cluster's name. It must be unique within the project. -
resources
- specify the following from the doublecloud.clickhouse.v1.ClusterResources model:-
resource_preset_id
- specify the name of the hardware resource preset for your cluster. For the list of available presets for ClickHouse® clusters, see DoubleCloud hardware instances. -
disk_size
- the storage size for your cluster in bytes. We recommend allocating no less than34359738368
bytes (32 GB). -
replica_count
- specify the number of replicas between1
and3
. -
shard_count
- specify the number of shards.
-
Delete a backup
Warning
At the moment, you can't delete a backup manually from the console. The DoubleCloud service automatically deletes backups after 7 days since creation.
For manual deletion, use the API.
-
Go to the Clusters overview
-
Select the cluster whose backup you want to delete and click it.
-
Go to the Backups tab.
-
Select a backup you want to delete.
-
Click
-
Click Delete to confirm your action.
Use the BackupService
delete method and pass the backup ID in the backup_id
request parameter.
To find the backup ID, use the BackupService
list method with project_id
parameter. You can get this value on your project's information page.