Update documentation

This commit is contained in:
Harshavardhana
2015-04-08 17:02:50 -07:00
parent 76d7710122
commit abd2bd729b
14 changed files with 217 additions and 73 deletions
+23
View File
@@ -0,0 +1,23 @@
#### generate config
```
NAME:
config - Generate configuration "/home/alexa/.mc/config.json" file.
USAGE:
command config [command options] [arguments...]
DESCRIPTION:
Configure minio client configuration data. If your config
file does not exist (the default location is ~/.auth), it will be
automatically created for you. Note that the configure command only writes
values to the config file. It does not use any configuration values from
the environment variables.
OPTIONS:
--accesskeyid, -a AWS access key ID
--secretkey, -s AWS secret access key
--alias Add aliases into config
--completion Generate bash completion "/home/alexa/.mc/mc.bash_completion" file.
```
+26
View File
@@ -0,0 +1,26 @@
#### copy objects
```
NAME:
mc cp - copy objects and files
USAGE:
mc cp [ARGS...] SOURCE TARGET [TARGET...]
DESCRIPTION:
Copy files and objects recursively between Amazon S3, Minio Object Storage and Filesystem
OPTIONS:
--recursive, -r recursively crawls a given directory or bucket
EXAMPLES:
1. Copy an object from Amazon S3 object storage to local fileystem.
$ mc cp https://s3.amazonaws.com/jukebox/klingon_opera_aktuh_maylotah.ogg wakeup.ogg
2. Copy a bucket recursive from Minio object storage to Amazon S3 object storage
$ mc cp --recursive http://localhost:9000/photos/burningman2011 https://s3.amazonaws.com/burningman/
3. Copy a local folder to Minio object storage and Amazon S3 object storage
$ mc cp --recursive backup/ http://localhost:9000/archive/ https://s3.amazonaws.com/archive/
```
+24
View File
@@ -0,0 +1,24 @@
#### list objects
```
NAME:
mc ls - list files and objects
USAGE:
mc ls TARGET
DESCRIPTION:
List files and objects recursively between Amazon S3, Minio Object Storage and Filesystem
EXAMPLES:
1. List objects on Minio object storage
$ mc ls http://localhost:9000/backup/
2015-03-28 12:47:50 PDT 51.00 MB 2006-Jan-1/backup.tar.gz
2015-03-31 14:46:33 PDT 55.00 MB 2006-Mar-1/backup.tar.gz
2. List buckets on Amazon S3 object storage
$ mc ls https://s3.amazonaws.com/
2015-01-20 15:42:00 PST rom
2015-01-15 00:05:40 PST zek
```
+20
View File
@@ -0,0 +1,20 @@
#### make bucket
```
NAME:
mc mb - makes a bucket
USAGE:
mc mb TARGET
DESCRIPTION:
Creates an S3 bucket
EXAMPLES:
1. Create a bucket on Amazon S3 object storage
$ mc mb https://s3.amazonaws.com/public-photo-store
2. Create a bucket on Minio object storage
$ mc mb http://localhost:9000/mongodb-backup
```
+36
View File
@@ -0,0 +1,36 @@
### Debugging ``mc`` commands
#### mb [DEBUG]
```
$ mc --debug mb localhost:localbucket
PUT /localbucket HTTP/1.1
Host: localhost:9000
User-Agent: Minio s3Client
Content-Length: 0
Authorization: AWS **PASSWORD**STRIPPED**
Date: Wed, 08 Apr 2015 23:44:29 GMT
Accept-Encoding: gzip
HTTP/1.1 200 OK
```
#### ls [DEBUG]
```
$ mc --debug ls localhost:
GET / HTTP/1.1
Host: localhost:9000
User-Agent: Minio s3Client
Authorization: AWS **PASSWORD**STRIPPED**
Date: Wed, 08 Apr 2015 23:42:36 GMT
Accept-Encoding: gzip
HTTP/1.1 200 OK
Connection: close
Content-Length: 221
Accept-Ranges: bytes
Content-Type: application/xml
Date: Wed, 08 Apr 2015 23:42:36 GMT
Server: Minio
2015-04-08 09:42:36 PDT newbucket
```
+34 -19
View File
@@ -12,6 +12,8 @@ mc - Minio Client for S3 Compatible Object Storage released under [Apache licens
### Commands
```
$ mc help
NAME:
mc - Minio Client for S3 Compatible Object Storage
@@ -19,46 +21,59 @@ USAGE:
mc [global options] command [command options] [arguments...]
VERSION:
0.1.0
<---- GIT COMMIT ID ---->
AUTHOR:
Minio.io
BUILD:
<---- BUILD TIME ---->
COMMANDS:
cp copy objects
ls get list of objects
mb makes a bucket
config Generate configuration "/home/harsha/.minio/mc/config.json" file.
help, h Shows a list of commands or help for one command
cp copy objects and files
ls list files and objects
mb makes a bucket
config Generate configuration "/home/alexa/.mc/config.json" file.
GLOBAL OPTIONS:
--debug enable HTTP tracing
--quiet, -q disable chatty output, such as the progress bar
--get-bash-completion Generate bash completion "/home/harsha/.minio/mc/mc.bash_completion" file.
--help, -h show help
--generate-bash-completion
--version, -v print the version
--debug enable HTTP tracing
--quiet, -q disable chatty output, such as the progress bar
--version, -v print the version
```
## Contribute
[Contribute to mc](./contributing.md)
### Supported platforms
| Name | Supported |
| ------------- | ------------- |
| Linux | Yes |
| Windows | Yes |
| Mac OSX | Yes |
### Supported architectures
| Arch | Supported |
| ------------- | ------------- |
| x86-64 | Yes |
| arm64 | Not yet|
| i386 | Not yet |
### Enable bash completion
To generate bash completion for ``mc`` all you have to do is
```
$ mc --get-bash-completion
$ mc config --completion
Configuration written to /home/user/.minio/mc/mc.bash_completion
Configuration written to /home/user/.mc/mc.bash_completion
$ source ${HOME}/.minio/mc/mc.bash_completion
$ echo 'source ${HOME}/.minio/mc/mc.bash_completion' >> ${HOME}/.bashrc
$ source ${HOME}/.mc/mc.bash_completion
$ echo 'source ${HOME}/.mc/mc.bash_completion' >> ${HOME}/.bashrc
```
```
$ mc <TAB><TAB>
config cp h help ls mb sync
config cp h help ls mb
```