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.

Kevin M. Mansour
  • 2,915
  • 6
  • 18
  • 35
Gnom Skull
  • 119
  • 1
  • 7
  • how did you backup database - using [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup#clickhouse-backup)-tool? – vladimir Apr 06 '21 at 16:42

1 Answers1

3

it looks like a Native format

it should something like

clickhouse-client -q 'insert into mytable format Native' < 21_02_04_db.backup
Denny Crane
  • 11,574
  • 2
  • 19
  • 30
  • 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? – Gnom Skull Apr 07 '21 at 08:16
  • Clickhouse does not have a backup for the whole database. – Denny Crane Apr 07 '21 at 11:28