Skip to content

Commit

Permalink
allow_s3_native_copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Jun 11, 2024
1 parent a6042fa commit 89eae2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/backup/backuper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions test/integration/dynamic_settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ cat <<EOT > /etc/clickhouse-server/config.d/storage_configuration_azblob.xml
<account_name>devstoreaccount1</account_name>
<account_key>Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==</account_key>
<cache_enabled>false</cache_enabled>
<use_native_copy>true</use_native_copy>
</disk_azblob>
<backups_azure>
<type>azure_blob_storage</type>
Expand All @@ -351,6 +352,7 @@ cat <<EOT > /etc/clickhouse-server/config.d/storage_configuration_azblob.xml
<account_name>devstoreaccount1</account_name>
<account_key>Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==</account_key>
<cache_enabled>false</cache_enabled>
<use_native_copy>true</use_native_copy>
</backups_azure>
</disks>
<policies>
Expand Down

0 comments on commit 89eae2f

Please sign in to comment.