minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

feat: add mc get #4847

Closed jiuker closed 8 months ago

jiuker commented 8 months ago

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers under the terms of the Apache 2 license. By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 license.

Description

add mc get

Motivation and Context

How to test this PR?

1.deploy minio-server 2.make bucket 3.one shell for mc admin trace minio| grep s3. 4.mc get alias/bucket/dir/object localdir/objectName mc get alias/bucket/dir/object localdir/ 5.You will found that only have s3.GetObject call.

Types of changes

Checklist:

shtripat commented 8 months ago

Am I missing something? I see below two calls while running ./mc get m1/test-bucket/hosts ./abc/hosts

2024-02-20T18:49:43.710 [200 OK] s3.GetBucketLocation localhost:9000/test-bucket/?location=  [::1]            163µs       ⇣  154.365µs  ↑ 93 B ↓ 128 B
2024-02-20T18:49:43.710 [200 OK] s3.GetObject localhost:9000/test-bucket/hosts [::1]            477µs       ⇣  463.146µs  ↑ 93 B ↓ 1.0 KiB
jiuker commented 8 months ago

Am I missing something? I see below two calls while running ./mc get m1/test-bucket/hosts ./abc/hosts

2024-02-20T18:49:43.710 [200 OK] s3.GetBucketLocation localhost:9000/test-bucket/?location=  [::1]            163µs       ⇣  154.365µs  ↑ 93 B ↓ 128 B
2024-02-20T18:49:43.710 [200 OK] s3.GetObject localhost:9000/test-bucket/hosts [::1]            477µs       ⇣  463.146µs  ↑ 93 B ↓ 1.0 KiB

You should set env with MC_REGION = Value. @shtripat