diff --git a/pkg/backup/create.go b/pkg/backup/create.go index dabdc5c6..54c23466 100644 --- a/pkg/backup/create.go +++ b/pkg/backup/create.go @@ -541,7 +541,7 @@ func (b *Backuper) AddTableToBackup(ctx context.Context, backupName, shadowBacku // Unfreeze to unlock data on S3 disks, https://github.com/Altinity/clickhouse-backup/issues/423 if version > 21004000 { if err := b.ch.QueryContext(ctx, fmt.Sprintf("ALTER TABLE `%s`.`%s` UNFREEZE WITH NAME '%s'", table.Database, table.Name, shadowBackupUUID)); err != nil { - if (strings.Contains(err.Error(), "code: 60") || strings.Contains(err.Error(), "code: 81")) && b.cfg.ClickHouse.IgnoreNotExistsErrorDuringFreeze { + if (strings.Contains(err.Error(), "code: 60") || strings.Contains(err.Error(), "code: 81") || strings.Contains(err.Error(), "code: 218")) && b.cfg.ClickHouse.IgnoreNotExistsErrorDuringFreeze { b.ch.Log.Warnf("can't unfreeze table: %v", err) } else { return disksToPartsMap, realSize, err diff --git a/pkg/clickhouse/clickhouse.go b/pkg/clickhouse/clickhouse.go index 7e36f413..abae33ad 100644 --- a/pkg/clickhouse/clickhouse.go +++ b/pkg/clickhouse/clickhouse.go @@ -689,7 +689,7 @@ func (ch *ClickHouse) FreezeTable(ctx context.Context, table *Table, name string } query := fmt.Sprintf("ALTER TABLE `%s`.`%s` FREEZE %s;", table.Database, table.Name, withNameQuery) if err := ch.QueryContext(ctx, query); err != nil { - if (strings.Contains(err.Error(), "code: 60") || strings.Contains(err.Error(), "code: 81")) && ch.Config.IgnoreNotExistsErrorDuringFreeze { + if (strings.Contains(err.Error(), "code: 60") || strings.Contains(err.Error(), "code: 81") || strings.Contains(err.Error(), "code: 218")) && ch.Config.IgnoreNotExistsErrorDuringFreeze { ch.Log.Warnf("can't freeze table: %v", err) return nil }