Altinity / clickhouse-backup

Tool for easy backup and restore for ClickHouse® using object storage for backup files.
https://altinity.com
Other
1.29k stars 226 forks source link

[question] restore backup -- only schema #305

Closed javigs82 closed 3 years ago

javigs82 commented 3 years ago

hey,

if a backup generated with -s (only schema) is restored, is the data erased?

thanks in advance, Javi.

Slach commented 3 years ago

If you run clickhouse-backup restore --schema backup_name on exists database, you should get the error like a table db.table already exists if exists database contains the same tables schema

if you want to restore without data and clean existing data, try to run clickhouse-backup --rm --schema

be careful, if exists database contains tables which not contains in backup, they will stay on server