Manage ClickHouse® backups

Create a manual backup

Managed Service for ClickHouse® automatically creates backups every day at approximately 1 AM in the cluster region timezone.

  1. Go to the Clusters page in the console.

  2. Select the cluster you want to create a backup for.

  3. Switch to the Backups tab.

  4. Click Create backup.

  5. Enter a name for your backup and click Submit.

A separate backup for each shard in the cluster will be created.

Use the BackuprService create method and pass the following parameters:

  • clusterId: ID of your cluster. To find the cluster ID, get a list of clusters in the project.

  • name: Backup name. Must be unique within the project.

Restore shards from backups

  1. Go to the Clusters page in the console.

  2. Select the cluster where you want to restore shards.

  3. Switch to the Backups tab.

  4. Select a shard you want to restore a backup from.

  5. Click Restore backup. The cluster creation page will open automatically.

  6. Follow the steps from the Create a cluster page to add a new cluster for your backup copy.

    Warning

    You can't use an existing cluster to restore data from a backup. Create a new cluster for this purpose and specify the desired 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: ID of your project. You can get this value on your project's information page.

  • backup_id: ID of the backup from which you want to restore the cluster. To get this id, use the BackupService list method with the project_id parameter.

  • region_id: Region ID. For a list of available regions and their region codes, refer to Areas and regions for Managed Service for ClickHouse®.

  • name: Cluster name. It must be unique within the project.

  • resources: Resource configuration from the doublecloud.clickhouse.v1.ClusterResources model:

    • resource_preset_id: Name of the hardware resource preset for your cluster. For a full list of presets available for ClickHouse® clusters, refer to DoubleCloud hardware instances.

    • disk_size: Storage size for your cluster in bytes.

    • replica_count: Number of replicas between 1 and 3.

    • shard_count: Number of shards.

See also