0

I have docker container with clickhouse database. And I have backups from our production. But I tried many cases with restore. When I using command (in container): clickhouse-client --format Raw --file 21_02_04_db.backup, I get error Bad arguments: unrecognised option '--file'. Okay, I tried without this option: clickhouse-client --format Raw < 21_02_04_db.backup and I get an error:

Code: 62. DB::Exception: Syntax error: failed at position 1 ('') (line 1, col 1): �TimDateTime�#�]�{�]�k�]u �]0&�] 9�]�-�]��]�I�]U��]���]yy�]���]�\�]�\�]��]{B�]�j�]v)�]�d�]J��]�F�]�]�]��]t%�]t%�]���]��]F?�]�B�]��]W3�]��]E��]P��]a�. Unrecognized token: '' I use other backups but in many cases I get similar error. Maybe someone tried restore backup clickhouse with help binary data? I try many cases but I didn't search solution.

1
  • how did you backup database - using clickhouse-backup-tool? Commented Apr 6, 2021 at 16:42

1 Answer 1

3

it looks like a Native format

it should something like

clickhouse-client -q 'insert into mytable format Native' < 21_02_04_db.backup
Sign up to request clarification or add additional context in comments.

2 Comments

Okay, but if i have backup whole database, if i will insert in some table, so i will get only filled one table and data for this table? Or my dump will fill all data in one table?
Clickhouse does not have a backup for the whole database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.