From 1beb9f69b0134e80b3a17541b262b25ca7e6c271 Mon Sep 17 00:00:00 2001 From: Slach Date: Wed, 4 Oct 2023 22:15:52 +0400 Subject: [PATCH] fix restore for object disk frozen_metadata.txt fix https://github.com/Altinity/clickhouse-backup/issues/752 --- ChangeLog.md | 4 ++++ pkg/backup/restore.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 14867d11..6a25538e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +# v2.4.2 +BUG FIXES +- fix restore for object disk frozen_metadata.txt fix [752](https://github.com/Altinity/clickhouse-backup/issues/752) + # v2.4.1 IMPROVEMENTS - switch to go-1.21 diff --git a/pkg/backup/restore.go b/pkg/backup/restore.go index 1dab8621..a71a247b 100644 --- a/pkg/backup/restore.go +++ b/pkg/backup/restore.go @@ -862,7 +862,7 @@ func (b *Backuper) downloadObjectDiskParts(ctx context.Context, backupName strin if err != nil { return err } - if objMeta.StorageObjectCount < 1 { + if objMeta.StorageObjectCount < 1 && objMeta.Version != object_disk.VersionRelativePath { return fmt.Errorf("%s: invalid object_dist.Metadata: %#v", fPath, objMeta) } var srcBucket, srcKey string