Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect behavior of restoring databse backup into the cluster. #486

Closed
Man-from-Nocturne opened this issue Aug 8, 2022 · 0 comments
Closed

Comments

@Man-from-Nocturne
Copy link

  1. There is CH cluster which contains 3 nodes and has schema 1 shard 3 replicas:
    image

  2. I using clickhouse-backup with next option in config file /etc/clickhouse-backup/clickhouse-backup.yml:

restore_schema_on_cluster: "spbchcluster"

  1. I can create backup successfully via command:
    clickhouse-backup create clusterbackup

image

  1. Also I can successfully restore table into the cluster via command:
    clickhouse-backup restore --table='articles.*' clusterbackup --rm

image

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.

  1. But there is sharp detail:
    image
    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.

  2. If we try to drop database articles and then restore it we will get an error:
    image

info CREATE TABLE articles.status UUID 'cefcdd60-6a65-4e41-9c32-19be193c928e' ON CLUSTER 'spbchcluster'
because we do not have database articles on cluster spbchcluster

@Slach Slach closed this as completed in 3129e7d Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant