diff --git a/cmd/admin-bucket-remote-add.go b/cmd/admin-bucket-remote-add.go index f2e8dab3..d1e36699 100644 --- a/cmd/admin-bucket-remote-add.go +++ b/cmd/admin-bucket-remote-add.go @@ -40,16 +40,12 @@ var adminBucketRemoteAddFlags = []cli.Flag{ }, cli.StringFlag{ Name: "service", - Usage: "type of service. Valid options are '[replication, ilm]'", + Usage: "type of service. Valid options are '[replication]'", }, cli.StringFlag{ Name: "region", Usage: "region of the destination bucket (optional)", }, - cli.StringFlag{ - Name: "label", - Usage: "set a label to identify this target (optional)", - }, cli.StringFlag{ Name: "bandwidth", Usage: "Set bandwidth limit in bits per second (K,B,G,T for metric and Ki,Bi,Gi,Ti for IEC units)", @@ -89,17 +85,12 @@ FLAGS: EXAMPLES: 1. Set a new remote replication target "targetbucket" in region "us-west-1" on https://minio.siteb.example.com for bucket 'sourcebucket'. {{.Prompt}} {{.HelpName}} sitea/sourcebucket https://foobar:foo12345@minio.siteb.example.com/targetbucket \ - --service "replication" --region "us-west-1" --label "hdd-tier" + --service "replication" --region "us-west-1" 2. Set a new remote replication target 'targetbucket' in region "us-west-1" on https://minio.siteb.example.com for - bucket 'sourcebucket' with bandwidth set to 2 gigabits (2*10^9) per second. + bucket 'sourcebucket' with bandwidth set to 2 gigabits per second. {{.Prompt}} {{.HelpName}} sitea/sourcebucket https://foobar:foo12345@minio.siteb.example.com/targetbucket \ --service "replication" --region "us-west-1 --bandwidth "2G" - - 3. Set a new remote transition target 'srcbucket' in region "us-west-1" on https://minio2:9000 for bucket 'srcbucket' on MinIO server. - {{.DisableHistory}} - {{.Prompt}} {{.HelpName}} myminio/srcbucket https://foobar:foo12345@minio2:9000/srcbucket --service "ilm" --region "us-west-1" --label "hdd-tier" - {{.EnableHistory}} `, } @@ -216,7 +207,6 @@ func fetchRemoteTarget(cli *cli.Context) (sourceBucket string, bktTarget *madmin Type: madmin.ServiceType(serviceType), Region: cli.String("region"), BandwidthLimit: int64(bandwidth), - Label: strings.ToUpper(cli.String("label")), } return sourceBucket, bktTarget } @@ -246,9 +236,6 @@ func mainAdminBucketRemoteAdd(ctx *cli.Context) error { fatalIf(cerr, "Unable to initialize admin connection.") sourceBucket, bktTarget := fetchRemoteTarget(ctx) - if bktTarget.Type == madmin.ILMService && !ctx.IsSet("label") { - fatalIf(errInvalidArgument().Trace(args...), "--label flag is required for ilm target") - } arn, e := client.SetRemoteTarget(globalContext, sourceBucket, bktTarget) if e != nil { fatalIf(probe.NewError(e).Trace(args...), "Unable to configure remote target") diff --git a/cmd/ilm-add.go b/cmd/ilm-add.go index fc7e1730..95e12ae9 100644 --- a/cmd/ilm-add.go +++ b/cmd/ilm-add.go @@ -58,11 +58,6 @@ EXAMPLES: 3. Add expiry and transition days rules on a prefix in mybucket. {{.Prompt}} {{.HelpName}} --expiry-days "300" --transition-days "200" \ --storage-class "GLACIER" s3/mybucket/doc - - 4. Add expiry and transition days rules on a prefix in mybucket for a MinIO transition target specified by label "hdd_tier". - "hdd_tier" is the label specified when adding a remote target with "mc admin bucket remote add --service ilm --label hdd_tier" - {{.Prompt}} {{.HelpName}} --expiry-days "300" --transition-days "200" \ - --storage-class "hdd_tier" myminio/mybucket/doc `, } @@ -89,7 +84,7 @@ var ilmAddFlags = []cli.Flag{ }, cli.StringFlag{ Name: "storage-class", - Usage: "storage class for transition (STANDARD_IA, ONEZONE_IA, GLACIER. Etc). For setting up transition to a MinIO target, use the label defined for the target", + Usage: "storage class for transition (STANDARD_IA, ONEZONE_IA, GLACIER. Etc).", }, cli.BoolFlag{ Name: "disable", diff --git a/docs/minio-admin-complete-guide.md b/docs/minio-admin-complete-guide.md index 4da709bb..b12ead24 100644 --- a/docs/minio-admin-complete-guide.md +++ b/docs/minio-admin-complete-guide.md @@ -909,21 +909,6 @@ ARN = `arn:minio:replication:us-west-1:1f8712ba-e38f-4429-bcb1-a7bb5aa97447:targ ``` mc admin bucket remote add myminio/srcbucket https://foobar:foobar12345@minio2:9000/targetbucket --service "replication" --region "us-west-1" --bandwidth "2Gi" -*Example: Add a new ILM transition target `targetbucket` with label "hdd_tier" in region `us-west-1` on `https://minio2:9000` for bucket `srcbucket` on MinIO server. `foobar` and `foo12345` are credentials to target endpoint. -* - -``` -mc admin bucket remote add myminio/srcbucket https://foobar:foobar12345@minio2:9000/targetbucket --service "ilm" --region "us-west-1" --label "hdd_tier" -ARN = `arn:minio:replication:us-west-1:1f8712ba-e38f-4429-bcb1-a7bb5aa97447:targetbucket` -``` - -*Example: Change credentials for existing replication target `targetbucket` with arn `arn:minio:replication:us-west-1:1f8712ba-e38f-4429-bcb1-a7bb5aa97447:targetbucket` on `https://minio2:9000` for bucket `srcbucket` on MinIO server. New credentials are `foobar1` and `foobarnew` - -``` -mc admin bucket remote edit myminio/srcbucket https://foobar1:foobarnew@minio2:9000/targetbucket --arn `arn:minio:replication:us-west-1:1f8712ba-e38f-4429-bcb1-a7bb5aa97447:targetbucket` -ARN = `arn:minio:replication:us-west-1:1f8712ba-e38f-4429-bcb1-a7bb5aa97447:targetbucket` -``` - *Example: Get remote target for replication on bucket 'srcbucket' in MinIO.* ``` diff --git a/docs/minio-client-complete-guide.md b/docs/minio-client-complete-guide.md index 20400ce4..db3ecf57 100644 --- a/docs/minio-client-complete-guide.md +++ b/docs/minio-client-complete-guide.md @@ -1377,12 +1377,6 @@ mc ilm ls myminio/testbucket For more details about the lifecycle configuration, refer to official AWS S3 documentation [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html) - -*Example: Add rule for prefix "dev" in bucket "testbucket" on play and transition after 2 days to transition tier specified by storage class label "hdd_tier". "hdd_tier" is the label specified when setting up MinIO transition target via `mc admin bucket remote add` command* -``` -mc ilm add --expiry-date "2020-09-17" play/testbucket/dev --transition-days 2 --storage-class "hdd_tier" -Lifecycle configuration rule added with ID `btd6pdot8748n94elvl0` to play/testbucket/dev. -``` *Example: Edit the lifecycle management configuration rule given by ID "btd6pdot8748n94elvl0" to set tags* ``` mc ilm edit --id "Documents" --tags "k1=v1&k2=v2" play/testbucket/dev