Managed ClickHouse Service

ClickHouse is an open source high-performance and column-oriented SQL database management system (DBMS). It is used for online analytical processing (OLAP).

How to restore backup from S3

  1. Find the snapshot:

    restic -r s3:s3.example.org/clickhouse-backups/table_name snapshots
    
  2. Restore it:

    restic -r s3:s3.example.org/clickhouse-backups/table_name restore latest --target /tmp/
    

For more details, read Restic: Effective Backup from Stdin.

Parameters

Common parameters

NameDescriptionTypeValue
replicasNumber of ClickHouse replicas.int2
shardsNumber of ClickHouse shards.int1
resourcesExplicit CPU and memory configuration for each ClickHouse replica. When omitted, the preset defined in resourcesPreset is applied.object{}
resources.cpuCPU available to each replica.quantity""
resources.memoryMemory (RAM) available to each replica.quantity""
resourcesPresetDefault sizing preset used when resources is omitted.stringsmall
sizePersistent Volume Claim size available for application data.quantity10Gi
storageClassStorageClass used to store the data.string""

Application-specific parameters

NameDescriptionTypeValue
logStorageSizeSize of Persistent Volume for logs.quantity2Gi
logTTLTTL (expiration time) for query_log and query_thread_log.int15
usersUsers configuration map.map[string]object{}
users[name].passwordPassword for the user.string""
users[name].readonlyUser is readonly (default: false).boolfalse

Backup parameters

NameDescriptionTypeValue
backupBackup configuration.object{}
backup.enabledEnable regular backups (default: false).boolfalse
backup.s3RegionAWS S3 region where backups are stored.stringus-east-1
backup.s3BucketS3 bucket used for storing backups.strings3.example.org/clickhouse-backups
backup.scheduleCron schedule for automated backups.string0 2 * * *
backup.cleanupStrategyRetention strategy for cleaning up old backups.string--keep-last=3 --keep-daily=3 --keep-within-weekly=1m
backup.s3AccessKeyAccess key for S3 authentication.string<your-access-key>
backup.s3SecretKeySecret key for S3 authentication.string<your-secret-key>
backup.resticPasswordPassword for Restic backup encryption.string<password>

ClickHouse Keeper parameters

NameDescriptionTypeValue
clickhouseKeeperClickHouse Keeper configuration.object{}
clickhouseKeeper.enabledDeploy ClickHouse Keeper for cluster coordination.booltrue
clickhouseKeeper.sizePersistent Volume Claim size available for application data.quantity1Gi
clickhouseKeeper.resourcesPresetDefault sizing preset.stringmicro
clickhouseKeeper.replicasNumber of Keeper replicas.int3

Parameter examples and reference

resources and resourcesPreset

resources sets explicit CPU and memory configurations for each replica. When left empty, the preset defined in resourcesPreset is applied.

resources:
  cpu: 4000m
  memory: 4Gi

resourcesPreset sets named CPU and memory configurations for each replica. This setting is ignored if the corresponding resources value is set.

Preset nameCPUmemory
nano250m128Mi
micro500m256Mi
small1512Mi
medium11Gi
large22Gi
xlarge44Gi
2xlarge88Gi