ClickHouse / ClickHouse

ClickHouse® is a real-time analytics DBMS
https://clickhouse.com
Apache License 2.0
36.92k stars 6.82k forks source link

RESTORE: Support backups created by clickhouse-backup #69832

Open vitlibar opened 1 week ago

vitlibar commented 1 week ago

ClickHouse supports built-in commands BACKUP and RESTORE to make backups and to restore from them. There is also an external utility clickhouse-backup which can do mostly the same. However the formats of such backups are different.

For example, for a single table mydb.mytable containing two parts:

It seems useful to add some support of clickhouse-backup backups to the RESTORE command, so RESTORE could restore from a backup generated by the clickhouse-backup utility.

UnamedRus commented 1 week ago

I see "problem", that backups still needs to be downloaded by clickhouse-backup and unpacked from remote storage. (format on remote storage is different)

So, if you already used this tool to download them, you can use the same tool for restoring of them.

And implementation of "download+restore" will be more complicated and it doesn't answer question what if backup stored on storage which is not supported by embedded backup ((S)FTP for example).

May be, if embedded backup got some features/feature parity with clickhouse-backup, it would be better goal.

Slach commented 1 week ago

better will implement BACKUP LIST and BACKUP DELETE SQL commands in this case clickhouse-backup could be used as just wrapper around BACKUP/RESTORE commands

we create umbrella backup issue and issues about BACKUP DELETE and BACKUP LIST was closed as "not planned"