From 89eae2f5ecaa2d55d16aaefad393af5c44db1d82 Mon Sep 17 00:00:00 2001 From: Slach Date: Tue, 11 Jun 2024 23:10:03 +0500 Subject: [PATCH] allow_s3_native_copy --- pkg/backup/backuper.go | 8 ++------ test/integration/dynamic_settings.sh | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/backup/backuper.go b/pkg/backup/backuper.go index 7a21ba2a..1fe20d15 100644 --- a/pkg/backup/backuper.go +++ b/pkg/backup/backuper.go @@ -183,12 +183,8 @@ func (b *Backuper) isDiskTypeEncryptedObject(disk clickhouse.Disk, disks []click func (b *Backuper) getEmbeddedBackupDefaultSettings(version int) []string { settings := []string{} - if b.cfg.General.RemoteStorage == "s3" || b.cfg.General.RemoteStorage == "gcs" { - if version > 23007001 { - settings = append(settings, "allow_s3_native_copy=1") - } else { - settings = append(settings, "native_copy=1") - } + if (b.cfg.General.RemoteStorage == "s3" || b.cfg.General.RemoteStorage == "gcs") && version > 23007001 { + settings = append(settings, "allow_s3_native_copy=1") } if b.cfg.General.RemoteStorage == "azblob" && version >= 24005001 { settings = append(settings, "allow_azure_native_copy=1") diff --git a/test/integration/dynamic_settings.sh b/test/integration/dynamic_settings.sh index 2b10e41f..428cf317 100755 --- a/test/integration/dynamic_settings.sh +++ b/test/integration/dynamic_settings.sh @@ -342,6 +342,7 @@ cat < /etc/clickhouse-server/config.d/storage_configuration_azblob.xml devstoreaccount1 Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== false + true azure_blob_storage @@ -351,6 +352,7 @@ cat < /etc/clickhouse-server/config.d/storage_configuration_azblob.xml devstoreaccount1 Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== false + true