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 replicasint2
shardsNumber of Clickhouse shardsint1
resourcesExplicit CPU and memory configuration for each Clickhouse replica. When left empty, the preset defined in resourcesPreset is applied.*object{}
resources.cpuCPU available to each replica*quantitynull
resources.memoryMemory (RAM) available to each replica*quantitynull
resourcesPresetDefault sizing preset used when resources is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge.stringsmall
sizePersistent Volume Claim size, available for application dataquantity10Gi
storageClassStorageClass used to store the datastring""

Application-specific parameters

NameDescriptionTypeValue
logStorageSizeSize of Persistent Volume for logsquantity2Gi
logTTLTTL (expiration time) for query_log and query_thread_logint15
usersUsers configurationmap[string]object{...}
users[name].passwordPassword for the user*stringnull
users[name].readonlyUser is readonly, default is false.*boolnull

Backup parameters

NameDescriptionTypeValue
backupBackup configurationobject{}
backup.enabledEnable regular backups, default is falseboolfalse
backup.s3RegionAWS S3 region where backups are storedstringus-east-1
backup.s3BucketS3 bucket used for storing backupsstrings3.example.org/clickhouse-backups
backup.scheduleCron schedule for automated backupsstring0 2 * * *
backup.cleanupStrategyRetention strategy for cleaning up old backupsstring--keep-last=3 --keep-daily=3 --keep-within-weekly=1m
backup.s3AccessKeyAccess key for S3, used for authenticationstring<your-access-key>
backup.s3SecretKeySecret key for S3, used for authenticationstring<your-secret-key>
backup.resticPasswordPassword for Restic backup encryptionstring<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 used when resources is omitted. Allowed values: nano, micro, small, medium, large, xlarge, 2xlarge.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