Backups in Managed Service for ClickHouse®
Managed Service for ClickHouse® supports automatic and manual database backups.
A backup is automatically created once a day. You cannot disable automatic backups or change their retention period.
For clusters running an unsupported DBMS version, restoring from backups is not available.
To restore a cluster from a backup, follow this guide.
Creating a backup
You can create backups either automatically or manually. In both cases, the incremental method is used:
- When you create a new backup, Managed Service for ClickHouse® checks data parts
for uniqueness. - If one of the existing backups already contains identical data parts
and they are not older than 30 days, they are not duplicated. For cold data in a hybrid storage, this period is 7 days.
A backup includes the entire cluster and contains all its shards. You can recover either individual shards or the entire cluster.
Note
Prior to April 1, 2025, separate backups were created for each cluster shard. For such backups, you can recover the following:
- One or multiple shard backups to an individual cluster.
- Entire cluster by specifying backups of all its shards.
You can recover multiple shards to a single cluster if their backups were created for the same cluster.
Backups contain data solely for the MergeTree engine family. For other engines, backups only contain table schemas. Learn more about the engines in this ClickHouse® guide
The system uses random replica hosts to create backups. Thus, if cluster hosts lack data consistency, restoring such a cluster from a backup does not guarantee complete data recovery. For example, this may occur in the following cases:
- The tables are not replicated on all shard hosts.
- The tables are not replicated and are only placed on some of the shard hosts.
When creating or updating a cluster, you can set the backup start window. The default value is 22:00 - 23:00 UTC (Coordinated Universal Time).
Backups are only created on running clusters. If you are not using your Managed Service for ClickHouse® cluster 24/7, check the settings of backup start time.
Learn about creating manual backups in Managing backups.
Storing a backup
-
Backups of local and network storages reside in a separate Object Storage bucket and take up no space in the cluster storage. If there are X GB of free space in the cluster, the first X GB of backups are stored free of charge.
-
Backups of cold data from a hybrid storage are stored in the same Object Storage bucket as the data itself. The cost of using Object Storage includes both the space used by the backups and the space used by the data itself.
For more information, see the pricing policy.
-
Backups are stored as binary files and encrypted using GPG
. Each cluster has its own encryption keys. -
The retention time for backups of an existing cluster depends on the way they were created:
-
Automatic backups are stored for 7 days by default. When creating or reconfiguring a cluster, you can specify a different retention period between 3 and 60 days.
-
Manual backups are stored with no time limit.
-
-
After you delete a cluster, all its backups are retained for 7 days.
-
Quotas
and limits for cluster storage do not apply to backup storage.
Testing recovery from a backup
To test how backup works, restore a cluster from a backup and check your data for integrity.
Deleting a backup
You can only delete manual backups. To delete such a backup, follow this guide.
Use cases
ClickHouse® is a registered trademark of ClickHouse, Inc