[root@scentos szc]# clickhouse-backup help
NAME:clickhouse-backup - Tool for easy backup of ClickHouse with cloud supportUSAGE:clickhouse-backup [-t, --tables=.
] VERSION:1.0.0DESCRIPTION:Run as 'root' or 'clickhouse' userCOMMANDS:tables Print list of tablescreate Create new backupcreate_remote Create and uploadupload Upload backup to remote storagelist Print list of backupsdownload Download backup from remote storagerestore Create schema and restore data from backuprestore_remote Download and restoredelete Delete specific backupdefault-config Print default configserver Run API serverhelp, h Shows a list of commands or help for one commandGLOBAL OPTIONS:--config FILE, -c FILE Config FILE name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]--help, -h show help--version, -v print the version
scentos :) drop table t_order_rmt;DROP TABLE t_order_rmtQuery id: 96d816dd-b93c-42b6-8890-ae5ca19dc2baOk.0 rows in set. Elapsed: 0.001 sec.
从备份还原:
[root@scentos szc]# clickhouse-backup restore 2021-12-12T10-40-48
2021/12/12 18:49:01 warn can't create table 'INFORMATION_SCHEMA.COLUMNS': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE COLUMNS;
2. CREATE TABLE COLUMNS
;
3. ATTACH TABLE COLUMNS FROM '/path/to/data/'
;
4. ATTACH TABLE COLUMNS UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'INFORMATION_SCHEMA.SCHEMATA': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE SCHEMATA;
2. CREATE TABLE SCHEMATA
;
3. ATTACH TABLE SCHEMATA FROM '/path/to/data/'
;
4. ATTACH TABLE SCHEMATA UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'INFORMATION_SCHEMA.TABLES': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE TABLES;
2. CREATE TABLE TABLES
;
3. ATTACH TABLE TABLES FROM '/path/to/data/'
;
4. ATTACH TABLE TABLES UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'INFORMATION_SCHEMA.VIEWS': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE VIEWS;
2. CREATE TABLE VIEWS
;
3. ATTACH TABLE VIEWS FROM '/path/to/data/'
;
4. ATTACH TABLE VIEWS UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'test_binlog.t_organization': code: 57, message: Table test_binlog.t_organization already exists, will try again
2021/12/12 18:49:01 warn can't create table 'information_schema.views': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE views;
2. CREATE TABLE views
;
3. ATTACH TABLE views FROM '/path/to/data/'
;
4. ATTACH TABLE views UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'datasets.hits_test': code: 57, message: Table datasets.hits_test already exists, will try again
2021/12/12 18:49:01 warn can't create table 'datasets.hits_v1': code: 57, message: Table datasets.hits_v1 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'datasets.hits_v2': code: 57, message: Table datasets.hits_v2 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'datasets.visits_v1': code: 57, message: Table datasets.visits_v1 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'datasets.visits_v2': code: 57, message: Table datasets.visits_v2 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'information_schema.tables': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE tables;
2. CREATE TABLE tables
;
3. ATTACH TABLE tables FROM '/path/to/data/'
;
4. ATTACH TABLE tables UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'information_schema.schemata': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE schemata;
2. CREATE TABLE schemata
;
3. ATTACH TABLE schemata FROM '/path/to/data/'
;
4. ATTACH TABLE schemata UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'default.st_order_mt': code: 57, message: Table default.st_order_mt already exists, will try again
2021/12/12 18:49:01 warn can't create table 'information_schema.columns': code: 80, message: Incorrect ATTACH TABLE query for Atomic database engine. Use one of the following queries instead:
1. ATTACH TABLE columns;
2. CREATE TABLE columns
;
3. ATTACH TABLE columns FROM '/path/to/data/'
;
4. ATTACH TABLE columns UUID ''
;, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_enum': code: 57, message: Table default.t_enum already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_tinylog': code: 57, message: Table default.t_tinylog already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_order_mt': code: 57, message: Table default.t_order_mt already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_order_mt2': code: 57, message: Table default.t_order_mt2 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_order_mt3': code: 57, message: Table default.t_order_mt3 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_order_rep2': code: 57, message: Table default.t_order_rep2 already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_order_rmt': code: 57, message: Directory for table data store/2b5/2b59d8bd-9488-415a-ab59-d8bd9488015a/ already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_order_smt': code: 57, message: Table default.t_order_smt already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.t_null': code: 57, message: Table default.t_null already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.test_a': code: 57, message: Table default.test_a already exists, will try again
2021/12/12 18:49:01 warn can't create table 'test_binlog.t_user': code: 57, message: Table test_binlog.t_user already exists, will try again
2021/12/12 18:49:01 warn can't create table 'datasets..inner.hits_mv': code: 57, message: Table datasets.`.inner.hits_mv` already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.non_deleted_test_a': code: 57, message: Table default.non_deleted_test_a already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.latest_non_deleted_test_a': code: 57, message: Table default.latest_non_deleted_test_a already exists, will try again
2021/12/12 18:49:01 warn can't create table 'datasets.hits_mv': code: 57, message: Table datasets.hits_mv already exists, will try again
2021/12/12 18:49:01 warn can't create table 'default.view_test_a': code: 57, message: Table default.view_test_a already exists, will try again
2021/12/12 18:49:01 error can't create table `default`.`st_order_mt_all2`: code: 57, message: Table default.st_order_mt_all2 already exists after 32 times, please check your schema depencncies