Skip to content

Commit b9d6114

Browse files
committed
backblaze s3 provider support only STANDARD storage class, fix #1086
Signed-off-by: Slach <bloodjazman@gmail.com>
1 parent 3c0e0cc commit b9d6114

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ IMPROVEMENTS
1414

1515
BUG FIXES
1616

17+
- `backblaze` s3 provider support only STANDARD storage class, fix [1086](https://github.com/Altinity/clickhouse-backup/issues/1086)
1718
- fix `--restore-database-mapping` with special characters in source table, fix
1819
reopened [820](https://github.com/Altinity/clickhouse-backup/issues/820#issuecomment-2675628282),
1920
thanks @IvaskevychYuriy

pkg/config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,11 @@ func LoadConfig(configLocation string) (*Config, error) {
358358

359359
log_helper.SetLogLevelFromString(cfg.General.LogLevel)
360360

361+
// https://github.com/Altinity/clickhouse-backup/issues/1086
362+
if cfg.General.RemoteStorage == "s3" && strings.Contains(cfg.S3.Endpoint, "backblaze") && cfg.S3.StorageClass != string(s3types.StorageClassStandard) {
363+
log.Warn().Str("endpoint", cfg.S3.Endpoint).Str("storageClass", cfg.S3.StorageClass).Msgf("unsopported STORAGE_CLASS, will use %s", string(s3types.StorageClassStandard))
364+
cfg.S3.StorageClass = string(s3types.StorageClassStandard)
365+
}
361366
if err = ValidateConfig(cfg); err != nil {
362367
return cfg, err
363368
}

0 commit comments

Comments
 (0)