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
@Slach gave me a workaround for this: allow empty backups in the configuration of clickhouse-backup.
general:
allow_empty_backups: true
Restoring the schema tries to create the tables on the system database instead of the appropriate database.
In my case, the database rnd holds the events_local table and the events distributed table. When restoring the schema, clickhouse-backup tries to create the tables system.events_local and system.events (which already exists):
# LOG_LEVEL=debug clickhouse-backup restore --rm --schema 2021-09-15-rnd-0.6.4-shard02
...
2021/09/15 16:17:02 debug CREATE DATABASE IF NOT EXISTS `rnd`
2021/09/15 16:17:02 debug SELECT engine FROM system.databases WHERE name = 'rnd'
2021/09/15 16:17:02 debug DROP TABLE IF EXISTS `rnd`.`events_local`
2021/09/15 16:17:02 debug CREATE TABLE events_local
(
`time` DateTime,
`kind` UInt8,
`host` String,
`port` UInt16,
`data` UInt32
)
ENGINE = ReplicatedMergeTree('/clickhouse/{cluster}/tables/{shard}/rnd.events_local', '{shard}_{replica}')
PARTITION BY toYear(time)
ORDER BY (time, kind)
SETTINGS index_granularity = 8192
2021/09/15 16:17:03 debug CREATE DATABASE IF NOT EXISTS `rnd`
2021/09/15 16:17:03 debug SELECT engine FROM system.databases WHERE name = 'rnd'
2021/09/15 16:17:03 debug DROP TABLE IF EXISTS `rnd`.`events`
2021/09/15 16:17:03 debug CREATE TABLE events
(
`time` DateTime,
`kind` UInt8,
`host` String,
`port` UInt16,
`data` UInt32
)
ENGINE = Distributed('{cluster}', 'rnd', 'events_local', rand())
2021/09/15 16:17:03 warn can't create table 'rnd.events': code: 57, message: Table system.events already exists., will try again
Table events_local table is indeed created in the system database instead of the rnd database:
SHOW CREATE TABLE system.events_local
Row 1:
──────
statement: CREATE TABLE system.events_local
(
`time` DateTime,
`kind` UInt8,
`host` String,
`port` UInt16,
`data` UInt32
)
ENGINE = ReplicatedMergeTree('/clickhouse/{cluster}/tables/{shard}/rnd.events_local', '{shard}_{replica}')
PARTITION BY toYear(time)
ORDER BY (time, kind)
SETTINGS index_granularity = 8192
# v1.2.0
INCOMPATIBLE CHANGES
- REST API `/backup/status` now return only latest executed command with status and error message
IMPROVEMENTS
- Added REST API `/backup/list/local` and `/backup/list/remote` to allow list backup types separately
- Decreased background backup creation time via REST API `/backup/create`, during avoid list remote backups for update metrics value
- Decreased backup creation time, during avoid scan whole `system.tables` when set `table` query string parameter or `--tables` cli parameter
- Added `last` and `filter` query string parameters to REST API `/backup/actions`, to avoid pass to client long JSON documents
- Improved `FTP` remote storage parallel upload / download
- Added `FTP_CONCURRENCY` to allow, by default MAX_CPU / 2
- Added `FTP_DEBUG` setting, to allow debug FTP commands
- Added `FTP` to CI/CD on any commit
- Added race condition check to CI/CD
BUG FIXES
- environment variable `LOG_LEVEL` now apply to `clickhouse-backup server` properly
- fix#280, incorrect prometheus metrics measurement for `/backup/create`, `/backup/upload`, `/backup/download`
- fix#273, return `S3_PART_SIZE` back, but calculates it smartly
- fix#252, now you can pass `last` and `filter` query string parameters
- fix#246, incorrect error messages when use `REMOTE_STORAGE=none`
- fix#283, properly handle error message from `FTP` server
- fix#268, properly restore legacy backup for schema without database name
- fix#287
When restoring with clickhouse-backup 1.0.0 a backup created with a previous version of clickhouse-backup (0.6.4), I found a couple of issues:
Downloading the backup gives an is empty backup error, although the backup is not empty:
$ clickhouse-backup download 2021-09-15-rnd-0.6.4-shard02
2021/09/15 16:06:49 error '2021-09-15-rnd-0.6.4-shard02' is empty backup
@Slach gave me a workaround for this: allow empty backups in the configuration of clickhouse-backup.
In my case, the database rnd holds the events_local table and the events distributed table. When restoring the schema, clickhouse-backup tries to create the tables system.events_local and system.events (which already exists):
Table events_local table is indeed created in the system database instead of the rnd database:
Clickhouse-backup versions:
To create the backup:
To restore the backup:
The text was updated successfully, but these errors were encountered: