diff --git a/ChangeLog.md b/ChangeLog.md index 06d4058a..a049877a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,7 @@ BUG FIXES - properly decode varint in *.state2 files during check already processed files to avoid too large numbers in logs +- add support `s3://` in parsing endpoint in fix [1035](https://github.com/Altinity/clickhouse-backup/issues/1035) # v2.6.4 diff --git a/go.mod b/go.mod index 77b4d5b1..e9efb6ef 100644 --- a/go.mod +++ b/go.mod @@ -141,7 +141,7 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect - golang.org/x/net v0.32.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/time v0.8.0 // indirect diff --git a/go.sum b/go.sum index d32b4d7f..a4a5b46d 100644 --- a/go.sum +++ b/go.sum @@ -501,8 +501,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= diff --git a/pkg/storage/object_disk/object_disk.go b/pkg/storage/object_disk/object_disk.go index 64a6724e..58f207d3 100644 --- a/pkg/storage/object_disk/object_disk.go +++ b/pkg/storage/object_disk/object_disk.go @@ -508,6 +508,11 @@ func makeObjectDiskConnection(ctx context.Context, ch *clickhouse.ClickHouse, cf s3cfg.Path = strings.Trim(s3URL.Path, "/") } s3cfg.ForcePathStyle = false + } else if s3URL.Scheme == "s3" { + // https://github.com/Altinity/clickhouse-backup/issues/1035 + s3cfg.Bucket = s3URL.Host + s3cfg.Path = s3URL.Path + s3cfg.ForcePathStyle = false } else { s3cfg.Endpoint = s3URL.Scheme + "://" + s3URL.Host pathItems := strings.Split(strings.Trim(s3URL.Path, "/"), "/")