Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Alibaba OSS Cloud #505

Open
AlexanderChiuluvB opened this issue Aug 29, 2022 · 18 comments
Open

Support Alibaba OSS Cloud #505

AlexanderChiuluvB opened this issue Aug 29, 2022 · 18 comments
Assignees
Milestone

Comments

@AlexanderChiuluvB
Copy link

AlexanderChiuluvB commented Aug 29, 2022

I want to support the tool upload data to OSS Cloud. Can I be assigned with this task?

@Slach
Copy link
Collaborator

Slach commented Aug 29, 2022

great , any contribution is welcome
please look to ./test/ folder and try to figure out how to write tests

Alibaba OSS have something like Azurite or minio for test locally?

@AlexanderChiuluvB
Copy link
Author

grea , any contribution is welcome please look to ./test/ folder and try to figure out how to write tests

Alibaba OSS have something like Azurite or minio for test locally?

OSS is S3 compatiable, minio can serve as a gateway for OSS

@Slach
Copy link
Collaborator

Slach commented Sep 3, 2022

@AlexanderChiuluvB any news? Could I help with anything?

@AlexanderChiuluvB
Copy link
Author

sorry I have been a little bit busy lately I will start push forward it may be 1 wk later

@john8628
Copy link

john8628 commented Feb 1, 2023

@AlexanderChiuluvB @Slach any update, we can test it recently

@Slach
Copy link
Collaborator

Slach commented Feb 1, 2023

@john8628 is Alibaba OSS is S3 compatible, all should works with S3 protocol

@john8628
Copy link

john8628 commented Feb 3, 2023

@Slach thanks for your reply ,i will try it ;

@pigzhuzhu55
Copy link

pigzhuzhu55 commented May 24, 2023

Can you provide an example of Alibaba OSS by S3 configuration, thank you.

@john8628
Copy link

john8628 commented May 29, 2023

#all the config should be following the s3 config; it works for me

remote_storage: s3 
s3:
  access_key: "oss key"
  secret_key: "oss secret_key"
  bucket: "oss bucket"
  endpoint: "oss endpoint"
  region: "oss region"
  assume_role_arn: ""
  force_path_style: false
  path: dd/backup/pro      
  disable_ssl: false
  compression_level: 1
  compression_format: tar
  sse: ""
  disable_cert_verification: false
  storage_class: STANDARD
  concurrency: 1
  part_size: 0
  debug: false

@and1990
Copy link

and1990 commented Jul 12, 2023

@john8628 Hi, I use Oss as my remote storage, the backup data can be uploaded to Oss successfully, but clickhouse-backup list remote shows "The specified key does not exist". Do you have encountered this problem? Thanks.

@john8628
Copy link

Yes, it often happens when your path or your endpoint is not right;

@and1990
Copy link

and1990 commented Jul 12, 2023

@john8628 How did you solve this problem?

@john8628
Copy link

check your path ; ak/sk and endpoint is inner network?

@and1990
Copy link

and1990 commented Jul 13, 2023

check your path ; ak/sk and endpoint is inner network?

Could you give me some hints? This is my configuration.

s3:
    access_key: "xxxxx"
    secret_key: "xxxx"
    bucket: "test-clickhouse-backup"
    endpoint: "https://test-clickhouse-backup.oss-cn-beijing-internal.aliyuncs.com/"
    region: "oss-cn-beijing"
    acl: private
    assume_role_arn: ""
    force_path_style: false
    path: "core3"
    disable_ssl: false
    compression_level: 1
    compression_format: tar
    sse: ""
    sse_kms_key_id: ""
    sse_customer_algorithm: ""
    sse_customer_key: ""
    sse_customer_key_md5: ""
    sse_kms_encryption_context: ""
    disable_cert_verification: false
    use_custom_storage_class: false
    storage_class: STANDARD
    custom_storage_class_map: {}
    concurrency: 3
    part_size: 0
    max_parts_count: 5000
    allow_multipart_download: false
    object_labels: {}
    debug: false
gcs:

Now, the data can be uploaded to oss successfully, but the command clickhouse-backup list remote shows "The specified key does not exist". The oss Web UI is like this.
image

@john8628
Copy link

oh , endpoint is not right , following the https://www.alibabacloud.com/help/en/object-storage-service/latest/regions-and-endpoints ; and if your abosolute path is oss://{bucket}{specific path} then your path should be specific path;your path should be test-clickhouse-backup/core3/

@and1990
Copy link

and1990 commented Jul 13, 2023

oh , endpoint is not right , following the https://www.alibabacloud.com/help/en/object-storage-service/latest/regions-and-endpoints ; and if your abosolute path is oss://{bucket}{specific path} then your path should be specific path;your path should be test-clickhouse-backup/core3/

Actually, I have tested before with the endpoint oss-cn-beijing-internal.aliyuncs.com, and it shows the error "HostID: oss-cn-beijing-internal.aliyuncs.com, api error SecondLevelDomainForbidden: Please use virtual hosted style to access."

It means that the bucket name must be added to the head of endpoints.

@Slach
Copy link
Collaborator

Slach commented Jul 13, 2023

@and1990
try

s3:
 bucket: test-clickhouse-backup
 force_path_style: true
 path: core3
 endpoint: https://oss-cn-beijing-internal.aliyuncs.com

@easayliu
Copy link

easayliu commented Aug 7, 2023

use old version ,it can help you

                - name: S3_ENDPOINT
                  value: oss-cn-hangzhou-internal.aliyuncs.com
                - name: S3_FORCE_PATH_STYLE
                  value: "false"

@Slach Slach added this to the 2.6.0 milestone Apr 8, 2024
@Slach Slach modified the milestones: 2.6.0, 2.6.1 Aug 28, 2024
@Slach Slach modified the milestones: 2.6.2, 2.6.3 Oct 8, 2024
@Slach Slach modified the milestones: 2.6.3, 2.6.4 Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants