Skip to content

Commit

Permalink
skip ValidateObjectDiskConfig for --diff-from-remote when object …
Browse files Browse the repository at this point in the history
…disk doesn't contains data fix #910
  • Loading branch information
Slach committed May 3, 2024
1 parent bc2ee3b commit 0f7f292
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.5.6
BUG FIXES
- skip `ValidateObjectDiskConfig` for `--diff-from-remote` when object disk doesn't contains data fix [910](https://github.com/Altinity/clickhouse-backup/issues/910)

# v2.5.5
IMPROVEMENTS
- added `object_disk_server_side_copy_concurrency` with default value `32`, to avoid slow `create` or `restore` backup process which was restricted by `upload_concurrency` or `download_concurrency` options, fix [903](https://github.com/Altinity/clickhouse-backup/issues/903)
Expand Down
11 changes: 8 additions & 3 deletions pkg/backup/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,21 @@ func (b *Backuper) createBackupLocal(ctx context.Context, backupName, diffFromRe
}
}
}
if isObjectDiskContainsTables || (diffFromRemote != "" && b.cfg.General.RemoteStorage != "custom") {
var err error

var err error
// https://github.com/Altinity/clickhouse-backup/issues/910
if isObjectDiskContainsTables {
if err = config.ValidateObjectDiskConfig(b.cfg); err != nil {
return err
}
}

if isObjectDiskContainsTables || (diffFromRemote != "" && b.cfg.General.RemoteStorage != "custom") {
b.dst, err = storage.NewBackupDestination(ctx, b.cfg, b.ch, false, backupName)
if err != nil {
return err
}
if err := b.dst.Connect(ctx); err != nil {
if err = b.dst.Connect(ctx); err != nil {
return fmt.Errorf("can't connect to %s: %v", b.dst.Kind(), err)
}
defer func() {
Expand Down

0 comments on commit 0f7f292

Please sign in to comment.