move 'mc ilm' to 'mc bucket ilm' (#3320)

update relevant docs and use the same
usage message consistently
This commit is contained in:
Harshavardhana
2020-07-25 11:31:42 -07:00
committed by GitHub
parent 2750c4bfe6
commit 90d22b271f
9 changed files with 54 additions and 52 deletions
+27 -25
View File
@@ -4,31 +4,33 @@
MinIO Client (mc) provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff, find etc. It supports filesystems and Amazon S3 compatible cloud storage service (AWS Signature v2 and v4).
```
ls list buckets and objects
mb make a bucket
rb remove a bucket
cat display object contents
head display first 'n' lines of an object
pipe stream STDIN to an object
share generate URL for temporary access to an object
cp copy objects
mirror synchronize objects to a remote site
find search for objects
sql run sql queries on objects
stat stat contents of objects
lock set and get object lock configuration
retention set object retention for objects with a given prefix
legalhold set object legal hold for objects
diff list differences in object name, size, and date between buckets
rm remove objects
event manage object notifications
watch watch for object events
policy manage anonymous access to objects
admin manage MinIO servers
session manage saved sessions for cp command
config manage mc configuration file
update check for a new software update
version print version info
ls list buckets and objects
mb make a bucket
rb remove a bucket
cp copy objects
mirror synchronize object(s) to a remote site
cat display object contents
head display first 'n' lines of an object
pipe stream STDIN to an object
share generate URL for temporary access to an object
find search for objects
sql run sql queries on objects
stat show object metadata
mv move objects
tree list buckets and objects in a tree format
du summarize disk usage recursively
retention set retention for object(s)
legalhold set legal hold for object(s)
diff list differences in object name, size, and date between two buckets
rm remove objects
event manage object notifications
watch listen for object notification events
policy manage anonymous access to buckets and objects
tag manage tags for bucket(s) and object(s)
bucket manage bucket configuration
admin manage MinIO servers
config configure MinIO client
update update mc to latest release
```
## Docker Container
+6 -5
View File
@@ -247,9 +247,9 @@ var completeCmds = map[string]complete.Predictor{
"/sql": s3Completer,
"/mb": aliasCompleter,
"/event/add": aliasCompleter,
"/event/list": aliasCompleter,
"/event/remove": aliasCompleter,
"/event/add": s3Complete{deepLevel: 2},
"/event/list": s3Complete{deepLevel: 2},
"/event/remove": s3Complete{deepLevel: 2},
"/tag/list": s3Completer,
"/tag/remove": s3Completer,
@@ -264,8 +264,9 @@ var completeCmds = map[string]complete.Predictor{
"/share/list": nil,
"/share/upload": s3Completer,
"/bucket/replicate": s3Completer,
"/bucket/version": s3Completer,
"/bucket/ilm": s3Complete{deepLevel: 2},
"/bucket/replicate": s3Complete{deepLevel: 2},
"/bucket/version": s3Complete{deepLevel: 2},
// Admin API commands MinIO only.
"/admin/heal": s3Completer,
+1 -1
View File
@@ -32,7 +32,7 @@ import (
var bucketLockCmd = cli.Command{
Name: "lock",
Usage: "set and get object lock configuration",
Usage: "manage default bucket object lock configuration",
Action: mainLock,
Before: setGlobalsFromContext,
Flags: globalFlags,
+2 -1
View File
@@ -24,12 +24,13 @@ var (
var bucketCmd = cli.Command{
Name: "bucket",
Usage: "manage bucket",
Usage: "manage bucket configuration",
Action: mainBucket,
Before: setGlobalsFromContext,
HideHelpCommand: true,
Flags: append(bucketFlags, globalFlags...),
Subcommands: []cli.Command{
bucketILMCmd,
bucketLockCmd,
bucketReplicateCmd,
bucketVersionCmd,
+1 -1
View File
@@ -24,7 +24,7 @@ var (
var eventCmd = cli.Command{
Name: "event",
Usage: "configure object notifications",
Usage: "manage object notifications",
HideHelpCommand: true,
Action: mainEvent,
Before: setGlobalsFromContext,
+2 -2
View File
@@ -22,9 +22,9 @@ import (
"github.com/minio/minio/pkg/console"
)
var ilmCmd = cli.Command{
var bucketILMCmd = cli.Command{
Name: "ilm",
Usage: "configure bucket lifecycle",
Usage: "manage bucket lifecycle",
Action: mainILM,
Before: setGlobalsFromContext,
Flags: globalFlags,
-1
View File
@@ -339,7 +339,6 @@ var appCmds = []cli.Command{
diffCmd,
rmCmd,
eventCmd,
ilmCmd,
watchCmd,
policyCmd,
tagCmd,
+1 -1
View File
@@ -34,7 +34,7 @@ import (
var bucketReplicateCmd = cli.Command{
Name: "replicate",
Usage: "configure bucket replication",
Usage: "manage bucket replication",
Action: mainReplicate,
Before: setGlobalsFromContext,
Flags: append(replicateFlags, globalFlags...),
+14 -15
View File
@@ -18,19 +18,18 @@ stat show object metadata
mv move objects
tree list buckets and objects in a tree format
du summarize disk usage recursively
lock set and get object lock configuration
lock manage default bucket object lock configuration
retention set retention for object(s)
legalhold set legal hold for object(s)
diff list differences in object name, size, and date between two buckets
rm remove objects
event configure object notifications
ilm configure bucket lifecycle
bucket manage bucket(s)
event manage object notifications
bucket manage bucket configuration
watch listen for object notification events
policy manage anonymous access to buckets and objects
tag manage tags for bucket(s) and object(s)
admin manage MinIO servers
config configure MinIO client
config manage MinIO client
update update mc to latest release
```
@@ -303,10 +302,10 @@ mc version RELEASE.2020-04-25T00-43-23Z
| [**ls** - list buckets and objects](#ls) | [**tree** - list buckets and objects in a tree format](#tree) | [**mb** - make a bucket](#mb) | [**cat** - display object contents](#cat) |
| [**cp** - copy objects](#cp) | [**rb** - remove a bucket](#rb) | [**pipe** - stream STDIN to an object](#pipe) | [**version** - manage bucket version](#version) |
| [**share** - generate URL for temporary access to an object](#share) | [**rm** - remove objects](#rm) | [**find** - find files and objects](#find) | |
| [**diff** - list differences in object name, size, and date between two buckets](#diff) | [**mirror** - synchronize object(s) to a remote site](#mirror) | [**ilm** - configure bucket lifecycle](#ilm) | |
| [**config** - manage config file](#config) | [**policy** - set public policy on bucket or prefix](#policy) | [**event** - manage events on your buckets](#event) |[**replicate** - configure bucket replication](#replicate) |
| [**diff** - list differences in object name, size, and date between two buckets](#diff) | [**mirror** - synchronize object(s) to a remote site](#mirror) | [**ilm** - manage bucket lifecycle](#ilm) | |
| [**config** - manage config file](#config) | [**policy** - set public policy on bucket or prefix](#policy) | [**event** - manage events on your buckets](#event) |[**replicate** - manage bucket replication](#replicate) |
| [**update** - manage software updates](#update) | [**watch** - watch for events](#watch) | [**stat** - stat contents of objects and folders](#stat) | |
| [**head** - display first 'n' lines of an object](#head) | [**lock** - set and get object lock configuration](#lock) | [**retention** - set retention for object(s)](#retention) | |
| [**head** - display first 'n' lines of an object](#head) | [**lock** - manage default bucket object lock configuration](#lock) | [**retention** - set retention for object(s)](#retention) | |
| [**mv** - move objects](#mv) | [**sql** - run sql queries on objects](#sql) | [**legalhold** - set legal hold for object(s)](#legalhold) | |
@@ -1167,7 +1166,7 @@ mc watch ~/Photos
<a name="event"></a>
### Command `event`
``event`` provides a convenient way to configure various types of event notifications on a bucket. MinIO event notification can be configured to use AMQP, Redis, ElasticSearch, NATS and PostgreSQL services. MinIO configuration provides more details on how these services can be configured.
``event`` provides a convenient way to manage various types of event notifications on a bucket. MinIO event notification can be configured to use AMQP, Redis, ElasticSearch, NATS and PostgreSQL services. MinIO configuration provides more details on how these services can be configured.
```
USAGE:
@@ -1212,11 +1211,11 @@ mc event remove play/andoria arn:minio:sqs:us-east-1:1:your-queue
<a name="ilm"></a>
### Command `ilm`
``ilm`` provides a convenient way to setup various bucket lifecycle configurations.
``ilm`` - A convenient way to manage bucket lifecycle configuration.
```
USAGE:
mc ilm COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]
mc bucket ilm COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]
COMMANDS:
list pretty print bucket lifecycle configuration
@@ -1233,7 +1232,7 @@ FLAGS:
*Example: List the lifecycle management rules*
```
mc ilm list myminio/testbucket
mc bucket ilm list myminio/testbucket
ID | Prefix | Enabled | Expiry | Date/Days | Transition | Date/Days | Storage-Class | Tags
---------|--------|---------|--------|--------------|------------|-----------|---------------|------
Devices | dev/ | ✓ | ✓ | 17 Sep 2020 | ✗ | | |
@@ -1245,13 +1244,13 @@ For more details about the lifecycle configuration, refer to official AWS S3 doc
*Example: Add rule for testbucket on play*
```
mc ilm add --id "Devices" --prefix "dev/" --expiry-date "2020-09-17" play/testbucket
mc bucket ilm add --id "Devices" --prefix "dev/" --expiry-date "2020-09-17" play/testbucket
Lifecycle configuration rule added with ID `Devices` to play/testbucket.
```
*Example: Remove the lifecycle management configuration rule given by ID "Documents"*
```
mc ilm remove --id "Documents" play/testbucket
mc bucket ilm remove --id "Documents" play/testbucket
Rule ID `Documents` from target play/testbucket removed.
```
@@ -1360,7 +1359,7 @@ Tags removed for s3/testbucket/testobject.
<a name="replicate"></a>
### Command `replicate`
`replicate` command provides a convenient way to set, remove, and list bucket replication configuration.
`replicate` - A convenient way to manage bucket replication configuration.
```
USAGE: