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

restore backup error when table name and field name are same #297

Closed
goto217 opened this issue Nov 1, 2021 · 2 comments · Fixed by #310
Closed

restore backup error when table name and field name are same #297

goto217 opened this issue Nov 1, 2021 · 2 comments · Fixed by #310
Assignees
Milestone

Comments

@goto217
Copy link

goto217 commented Nov 1, 2021

clickhouse-backup version: 1.2.1

i backup table , the table name and field name are same.

 CREATE TABLE test.mm ( `mm` String ) ENGINE = ReplacingMergeTree ORDER BY mm SETTINGS index_granularity = 8192

backup success, but restore failed
error message:

warn can't create table 'test.mm': code: 62, message: Syntax error: failed at position 35 ('.'): .`mm` String) ENGINE = ReplacingMergeTree ORDER BY mm SETTINGS index_granularity = 8192. Expected one of: nested table, ALIAS, identifier, DEFAULT, data type, MATERIALIZED, will try again backup=/2021-11-01T06-08-50 operation=restore
@Slach
Copy link
Collaborator

Slach commented Nov 1, 2021

Thanks a lot for reporting, could you share results of following commands:

LOG_LEVEL=debug clickhouse-backup restore --table=test.mm

@Slach Slach self-assigned this Nov 1, 2021
@goto217
Copy link
Author

goto217 commented Nov 17, 2021

@Slach error message :

[root@restserver clickhouse-backup]# LOG_LEVEL=debug ./clickhouse-backup --config ./config.yml restore /2021-11-17T08-26-40
2021/11/17 16:30:25 debug SELECT value FROM `system`.`build_options` where name='VERSION_INTEGER'
2021/11/17 16:30:25 debug SELECT * FROM system.disks;
2021/11/17 16:30:25 debug CREATE DATABASE IF NOT EXISTS default
ENGINE = Atomic
2021/11/17 16:30:25 debug CREATE DATABASE IF NOT EXISTS test
ENGINE = Atomic
2021/11/17 16:30:25 debug SELECT * FROM system.disks;
2021/11/17 16:30:25 debug CREATE DATABASE IF NOT EXISTS `test`
2021/11/17 16:30:25 debug SELECT engine FROM system.databases WHERE name = 'test'
2021/11/17 16:30:25 debug CREATE TABLE test.mm UUID '6a569cf0-0d7a-4ca8-aa56-9cf00d7acca8' (`test`.`mm` String) ENGINE = ReplacingMergeTree ORDER BY mm SETTINGS index_granularity = 8192
2021/11/17 16:30:25 error can't create table `test`.`mm`: code: 62, message: Syntax error: failed at position 73 ('.'): .`mm` String) ENGINE = ReplacingMergeTree ORDER BY mm SETTINGS index_granularity = 8192. Expected one of: nested table, ALIAS, identifier, DEFAULT, data type, MATERIALIZED after 1 times, please check your schema dependencies
[root@restserver clickhouse-backup]# 

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

Successfully merging a pull request may close this issue.

2 participants