In a clickhouse 3 shard, 3 replica setup, I am trying to take a schema backup. But it fails with following error :
BACKUP DATABASE default
TO S3( 'https://bucket-id.s3.amazonaws.com/backup_folder/snapshot_2023_10_30_schema' )
SETTINGS structure_only=true ASYNC
-- Later check the status of the backup
SELECT * FROM system.backups WHERE id = 'query-id' \G
We observe following error
Code: 49.
DB::Exception: Table {} has its shared ID to be different from one from the create query:
While collecting tables for backup in database default. (LOGICAL_ERROR)
(version 23.6.2.18 (official build))
Few questions :
- How can we resolve this schema issue & bring it to stable state ?
- It is also not showing which particular table is causing the issue. Is there a way to know which table is causing the issue. May be, we don't need that particular table.
- Now such a state blocks the schema backup of whole database. Is there a way to skip and continue with other tables