You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is CH cluster which contains 3 nodes and has schema 1 shard 3 replicas:
I using clickhouse-backup with next option in config file /etc/clickhouse-backup/clickhouse-backup.yml:
restore_schema_on_cluster: "spbchcluster"
I can create backup successfully via command: clickhouse-backup create clusterbackup
Also I can successfully restore table into the cluster via command:
clickhouse-backup restore --table='articles.*' clusterbackup --rm
As you can see table articles.status has been restored into the cluster.
info CREATE TABLE articles.status UUID 'cefcdd60-6a65-4e41-9c32-19be193c928e' ON CLUSTER 'spbchcluster'
And it is correct.
But there is sharp detail:
I expect that command info CREATE DATABASE IF NOT EXISTS articles should be used with option ON CLUSTER , because we pointed option restore_schema_on_cluster: "spbchcluster" in config file.
If we try to drop database articles and then restore it we will get an error:
info CREATE TABLE articles.status UUID 'cefcdd60-6a65-4e41-9c32-19be193c928e' ON CLUSTER 'spbchcluster'
because we do not have database articles on cluster spbchcluster
The text was updated successfully, but these errors were encountered:
There is CH cluster which contains 3 nodes and has schema 1 shard 3 replicas:
I using clickhouse-backup with next option in config file
/etc/clickhouse-backup/clickhouse-backup.yml
:restore_schema_on_cluster: "spbchcluster"
clickhouse-backup create clusterbackup
clickhouse-backup restore --table='articles.*' clusterbackup --rm
As you can see table
articles.status
has been restored into the cluster.info CREATE TABLE articles.status UUID 'cefcdd60-6a65-4e41-9c32-19be193c928e' ON CLUSTER 'spbchcluster'
And it is correct.
But there is sharp detail:
I expect that command info
CREATE DATABASE IF NOT EXISTS
articles should be used with optionON CLUSTER
, because we pointed optionrestore_schema_on_cluster: "spbchcluster"
in config file.If we try to drop database articles and then restore it we will get an error:
info CREATE TABLE articles.status UUID 'cefcdd60-6a65-4e41-9c32-19be193c928e' ON CLUSTER 'spbchcluster'
because we do not have database
articles
on clusterspbchcluster
The text was updated successfully, but these errors were encountered: