diff --git a/cmd-sync.go b/cmd-sync.go index 42325e4d..ed231030 100644 --- a/cmd-sync.go +++ b/cmd-sync.go @@ -53,7 +53,7 @@ EXAMPLES: $ mc {{.Name}} star-trek-episode-10-season4.ogg https://s3.amazonaws.com/trekarchive 2. Sync a bucket recursively from Minio object storage to multiple buckets on Amazon S3 object storage. - $ mc {{.Name}} https://play.minio.io:9000/photos/2014... https://s3.amazonaws.com/backup-photos https://s3.amazonaws.com/my-photos + $ mc {{.Name}} https://play.minio.io:9000/photos/2014... https://s3.amazonaws.com/backup-photos https://s3-west-1.amazonaws.com/local-photos 3. Sync a local folder recursively to Minio object storage and Amazon S3 object storage. $ mc {{.Name}} backup/... https://play.minio.io:9000/archive https://s3.amazonaws.com/archive @@ -61,8 +61,8 @@ EXAMPLES: 4. Sync a bucket from aliased Amazon S3 object storage to multiple folders on Windows. $ mc {{.Name}} s3:documents/2014/... C:\backup\2014 C:\shared\volume\backup\2014 - 5. Sync a local file of non english character to Amazon s3 object storage. - $ mc {{.Name}} 本語/... s3:mylocaldocuments C:\backup\2014 play:backup + 5. Sync a local directory of non english character recursively to Amazon s3 object storage and Minio object storage. + $ mc {{.Name}} 本語/... s3:mylocaldocuments play:backup `, } diff --git a/docs/access.md b/docs/access.md new file mode 100644 index 00000000..7a370461 --- /dev/null +++ b/docs/access.md @@ -0,0 +1,24 @@ +#### access + +```go +Name: + mc access - Set access permissions + +USAGE: + mc access PERMISSION TARGET [TARGET...] + +EXAMPLES: + + 1. Set bucket to "private" on Amazon S3 object storage. + $ mc access private https://s3.amazonaws.com/burningman2011 + + 2. Set bucket to "public" on Amazon S3 object storage. + $ mc access public https://s3.amazonaws.com/shared + + 3. Set bucket to "authenticated" on Amazon S3 object storage to provide read access to IAM Authenticated Users group. + $ mc access authenticated https://s3.amazonaws.com/shared-authenticated + + 4. Set folder to world readwrite (chmod 777) on local filesystem. + $ mc access public /shared/Music + +``` diff --git a/docs/cat.md b/docs/cat.md new file mode 100644 index 00000000..69cbc9e5 --- /dev/null +++ b/docs/cat.md @@ -0,0 +1,23 @@ +#### cat + +```go +NAME: + mc cat - Display contents of a file + +USAGE: + mc cat SOURCE [SOURCE...] + +EXAMPLES: + 1. Concantenate an object from Amazon S3 object storage to mplayer standard input. + $ mc cat https://s3.amazonaws.com/ferenginar/klingon_opera_aktuh_maylotah.ogg | mplayer - + + 2. Concantenate a file from local filesystem to standard output. + $ mc cat khitomer-accords.txt + + 3. Concantenate multiple files from local filesystem to standard output. + $ mc cat *.txt > newfile.txt + + 4. Concatenate a non english file name from Amazon S3 object storage. + $ mc cat s3:andoria/本語 > /tmp/本語 + +``` diff --git a/docs/commands/access.md b/docs/commands/access.md deleted file mode 100644 index 4a170cf2..00000000 --- a/docs/commands/access.md +++ /dev/null @@ -1,20 +0,0 @@ -#### access - -```go -Name: - mc access - Set permissions [public, private, readonly] for buckets and folders. - -USAGE: - mc access PERMISSION TARGET [TARGET...] - -EXAMPLES: - - 1. Set bucket to "private" on Amazon S3 object storage - $ mc access private https://s3.amazonaws.com/burningman2011 - - 2. Set bucket to "public" on Amazon S3 object storage - $ mc access public https://s3.amazonaws.com/shared - - 3. Set folder to world readwrite (chmod 777) on local filesystem - $ mc access public /shared/Music -``` diff --git a/docs/commands/cat.md b/docs/commands/cat.md deleted file mode 100644 index ebd87e53..00000000 --- a/docs/commands/cat.md +++ /dev/null @@ -1,19 +0,0 @@ -#### cat - -```go -NAME: - mc cat - Concantenate objects or files to standard output - -USAGE: - mc cat SOURCE [SOURCE...] - -EXAMPLES: - 1. Concantenate an object from Amazon S3 object storage to mplayer standard input - $ mc cat https://s3.amazonaws.com/ferenginar/klingon_opera_aktuh_maylotah.ogg | mplayer - - - 2. Concantenate a file from local filesystem to standard output. - $ mc cat khitomer-accords.txt - - 3. Concantenate multiple files from local filesystem to standard output. - $ mc cat *.txt > newfile.txt -``` diff --git a/docs/commands/ls.md b/docs/commands/ls.md deleted file mode 100644 index de7b9915..00000000 --- a/docs/commands/ls.md +++ /dev/null @@ -1,38 +0,0 @@ -#### ls - -```go -NAME: - mc ls - List files and objects - -USAGE: - mc ls TARGET [TARGET...] - -EXAMPLES: - 1. List objects recursively on Minio object storage - $ mc ls https://play.minio.io:9000/backup/... - [2015-03-28 12:47:50 PDT] 34MiB 2006-Jan-1/backup.tar.gz - [2015-03-31 14:46:33 PDT] 55MiB 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] 0B rom/ - [2015-01-15 00:05:40 PST] 0B zek/ - - 3. List buckets from Amazon S3 object storage and recursively list objects from Minio object storage - $ mc ls https://s3.amazonaws.com/ https://play.minio.io:9000/backup/... - [2015-01-15 00:05:40 PST] 0B zek/ - [2015-03-31 14:46:33 PDT] 55MiB 2006-Mar-1/backup.tar.gz - - 4. List files recursively on local filesystem on Windows - $ mc ls C:\Users\Worf\... - [2015-03-28 12:47:50 PDT] 11MiB Martok\Klingon Council Ministers.pdf - [2015-03-31 14:46:33 PDT] 15MiB Gowron\Khitomer Conference Details.pdf - - 5. List files non recursively on local filesystem - $ mc ls /usr/lib/llvm-3.4 - [2015-04-01 14:57:17 PDT] 12KiB lib/ - [2015-04-01 14:57:17 PDT] 4.0KiB include/ - [2015-04-01 14:57:10 PDT] 4.0KiB build/ - [2015-04-01 14:57:07 PDT] 4.0KiB bin/ - -``` diff --git a/docs/commands/mb.md b/docs/commands/mb.md deleted file mode 100644 index e544ed33..00000000 --- a/docs/commands/mb.md +++ /dev/null @@ -1,19 +0,0 @@ -#### mb - -```go -NAME: - mc mb - Make a bucket or a folder - -USAGE: - mc mb TARGET [TARGET...] - -EXAMPLES: - 1. Create a bucket on Amazon S3 object storage - $ mc mb https://s3.amazonaws.com/public-document-store - - 2. Create a bucket on Minio object storage - $ mc mb https://play.minio.io:9000/mongodb-backup - - 3. Create multiple buckets on Amazon S3 object storage and Minio object storage - $ mc mb https://s3.amazonaws.com/public-photo-store https://play.minio.io:9000/mongodb-backup -``` diff --git a/docs/commands/config.md b/docs/config.md similarity index 100% rename from docs/commands/config.md rename to docs/config.md diff --git a/docs/contributing.md b/docs/contributing.md deleted file mode 120000 index 44fcc634..00000000 --- a/docs/contributing.md +++ /dev/null @@ -1 +0,0 @@ -../CONTRIBUTING.md \ No newline at end of file diff --git a/docs/commands/cp.md b/docs/cp.md similarity index 70% rename from docs/commands/cp.md rename to docs/cp.md index 106c4c1a..4fa39e2b 100644 --- a/docs/commands/cp.md +++ b/docs/cp.md @@ -2,21 +2,25 @@ ```go NAME: - mc cp - Copy objects and files from multiple sources single destination + mc cp - Copy files and folders from many sources to a single destination USAGE: - mc cp SOURCE TARGET [TARGET...] + mc cp SOURCE [SOURCE...] TARGET EXAMPLES: - 1. Copy list of objects from local file system to Amazon S3 object storage + 1. Copy list of objects from local file system to Amazon S3 object storage. $ mc cp Music/*.ogg https://s3.amazonaws.com/jukebox/ - 2. Copy a bucket recursively from Minio object storage to Amazon S3 object storage + 2. Copy a bucket recursively from Minio object storage to Amazon S3 object storage. $ mc cp https://play.minio.io:9000/photos/burningman2011... https://s3.amazonaws.com/private-photos/burningman/ - 3. Copy multiple local folders recursively to Minio object storage + 3. Copy multiple local folders recursively to Minio object storage. $ mc cp backup/2014/... backup/2015/... https://play.minio.io:9000/archive/ 4. Copy a bucket recursively from aliased Amazon S3 object storage to local filesystem on Windows. $ mc cp s3:documents/2014/... C:\backup\2014 + + 5. Copy an object of non english characters to Amazon S3 object storage. + $ mc cp 本語 s3:andoria/本語 + ``` diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 509e72cc..00000000 --- a/docs/index.md +++ /dev/null @@ -1,61 +0,0 @@ -# Minio Client - -mc - Minio Client for S3 Compatible Object Storage released under [Apache license v2](./LICENSE). - -## Install - -``` -# go get github.com/minio/mc -``` - -## Usage - -### Commands -``` -NAME: - mc - Minio Client for object storage and filesystems - -USAGE: - mc [global flags] command [command flags] [arguments...] - -VERSION: - 9b3f0a923efd39cd98487c08b761dbd0 - -BUILD: - 2015-04-28 11:59:38.77226527 -0700 PDT - -COMMANDS: - ls List files and objects - cp Copy objects and files from multiple sources single destination - sync Copies files and objects from single source to multiple destinations - cat Concantenate objects or files to standard output - mb Make a bucker or a folder - access Set permissions [public, private, readonly] for buckets and folders. - config Generate configuration "/home/harsha/.mc/config.json" file. - update Check for new software updates - -GLOBAL FLAGS: - --theme "minimal" Choose a console theme from this list [*minimal*, nocolor, white] - --debug Enable HTTP tracing - --quiet, -q Supress chatty console output - --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 | diff --git a/docs/ls.md b/docs/ls.md new file mode 100644 index 00000000..7beb2634 --- /dev/null +++ b/docs/ls.md @@ -0,0 +1,37 @@ +#### ls + +```go +NAME: + mc ls - List files and folders + +USAGE: + mc ls TARGET [TARGET...] + +EXAMPLES: + 1. List objects recursively on Minio object storage. + $ mc ls https://play.minio.io:9000/backup/... + [2015-03-28 12:47:50 PDT] 34MiB 2006-Jan-1/backup.tar.gz + [2015-03-31 14:46:33 PDT] 55MiB 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] 0B rom/ + [2015-01-15 00:05:40 PST] 0B zek/ + + 3. List buckets from Amazon S3 object storage and recursively list objects from Minio object storage. + $ mc ls https://s3.amazonaws.com/ https://play.minio.io:9000/backup/... + 2015-01-15 00:05:40 PST 0B zek/ + 2015-03-31 14:46:33 PDT 55MiB 2006-Mar-1/backup.tar.gz + + 4. List files recursively on local filesystem on Windows. + $ mc ls C:\Users\Worf\... + [2015-03-28 12:47:50 PDT] 11.00MiB Martok\Klingon Council Ministers.pdf + [2015-03-31 14:46:33 PDT] 15.00MiB Gowron\Khitomer Conference Details.pdf + + 5. List files with non english characters on Amazon S3 object storage. + $ mc ls s3:andoria/本... + [2015-05-19 17:21:49 PDT] 41B 本語.pdf + [2015-05-19 17:24:19 PDT] 41B 本語.txt + [2015-05-19 17:28:22 PDT] 41B 本語.md + +``` diff --git a/docs/mb.md b/docs/mb.md new file mode 100644 index 00000000..21c7b8ff --- /dev/null +++ b/docs/mb.md @@ -0,0 +1,19 @@ +#### mb + +```go +NAME: + mc mb - Make a bucket or folder + +USAGE: + mc mb TARGET [TARGET...] + +EXAMPLES: + 1. Create a bucket on Amazon S3 object storage. + $ mc mb https://s3.amazonaws.com/public-document-store + + 3. Make a directory on local filesystem, including its parent directories as needed. + $ mc mb ~/ + + 3. Create a bucket on Minio object storage. + $ mc mb https://play.minio.io:9000/mongodb-backup +``` diff --git a/docs/sdks/js/example-list.js b/docs/sdks/js/example-list.js deleted file mode 100644 index afa01758..00000000 --- a/docs/sdks/js/example-list.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict' - -var AWS = require('aws-sdk'); - -var config = { - accessKeyId: "ECHB22VEKH5I0X4K2T7P", - secretAccessKey: "IiqhtimkamPZJtV4J8jztm74LpdTSbn7RUASyPzjje2+pfhLJ7nFRg==", - endpoint: "localhost:9000", - region: "", - sslEnabled: false, - s3ForcePathStyle: true, -}; - -AWS.config.update(config); - -var s3 = new AWS.S3(); -s3.listBuckets(function(err, data) { - if (err) { - console.log(err); // an error occurred - } else { - console.log(data); // successful response - } -}); - - -var params = { - Bucket: "docs" -}; - -s3.listObjects(params, function(err, data) { - if (err) console.log(err); - else console.log(data); -}); diff --git a/docs/sdks/js/javascript.md b/docs/sdks/js/javascript.md deleted file mode 100644 index 7f806ffb..00000000 --- a/docs/sdks/js/javascript.md +++ /dev/null @@ -1,49 +0,0 @@ -# Using AWS SDK for Javascript - -## Install - -### In Node.js - -``` -npm install aws-sdk -``` - -### Example ``GetService`` and ``ListObjects`` - -``` -'use strict' - -var AWS = require('aws-sdk'); - -var config = { - accessKeyId: "ECHB22VEKH5I0X4K2T7P", - secretAccessKey: "IiqhtimkamPZJtV4J8jztm74LpdTSbn7RUASyPzjje2+pfhLJ7nFRg==", - endpoint: "localhost:9000", - region: "", - sslEnabled: false, - s3ForcePathStyle: true, -}; - -AWS.config.update(config); - -var s3 = new AWS.S3(); -s3.listBuckets(function(err, data) { - if (err) { - console.log(err); // an error occurred - } else { - console.log(data); // successful response - } -}); - - -var params = { - Bucket: "docs" -}; - -s3.listObjects(params, function(err, data) { - if (err) console.log(err); - else console.log(data); -}); -``` - -Grab it here [example-list.js](https://github.com/minio/mc/blob/master/docs/sdks/js/example-list.js) diff --git a/docs/sdks/python/example-list-buckets.py b/docs/sdks/python/example-list-buckets.py deleted file mode 100644 index 0d1cf793..00000000 --- a/docs/sdks/python/example-list-buckets.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -import boto3 -s3 = boto3.resource('s3', use_ssl=False, endpoint_url="http://localhost:9000") -for bucket in s3.buckets.all(): - print(bucket.name) diff --git a/docs/sdks/python/python.md b/docs/sdks/python/python.md deleted file mode 100644 index bbedf1e1..00000000 --- a/docs/sdks/python/python.md +++ /dev/null @@ -1,34 +0,0 @@ -# Using AWS SDK for Python - -## Install - -### In Python 2.6, 2.7, 3.3, 3.4 - -**WARNING**: Boto 3 is in *developer preview* and **should not** be used in production yet! - -``` -pip install boto3 -``` - -### Example - -Next, set up credentials (in e.g. ``~/.aws/credentials``):: - - [default] - aws_access_key_id = YOUR_MINIO_ACCESS_ID - aws_secret_access_key = YOUR_MINIO_SECRET_KEY - -``` -#!/usr/bin/env python - -import boto3 -s3 = boto3.resource('s3', use_ssl=False, endpoint_url="http://localhost:9000") -for bucket in s3.buckets.all(): - print(bucket.name) -... -bucket1 -bucket2 -bucket3 -``` - -Grab it here [example-list-buckets.py](https://github.com/minio/mc/blob/master/docs/sdks/python/example-list-buckets.py) \ No newline at end of file diff --git a/docs/sdks/ruby/example-list-buckets.rb b/docs/sdks/ruby/example-list-buckets.rb deleted file mode 100644 index 0497ec27..00000000 --- a/docs/sdks/ruby/example-list-buckets.rb +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ruby -require 'aws-sdk' - -s3 = Aws::S3::Client.new(endpoint: "http://localhost:9000/", - require_https_for_sse_cpk: false, - region: "minio") -resp = s3.list_buckets -resp.buckets.each do |bucket| - puts "#{bucket.name} => #{bucket.creation_date}" -end diff --git a/docs/sdks/ruby/ruby.md b/docs/sdks/ruby/ruby.md deleted file mode 100644 index 54b2b47f..00000000 --- a/docs/sdks/ruby/ruby.md +++ /dev/null @@ -1,37 +0,0 @@ -# Using AWS SDK for Ruby - Version 2 - -## Install - -### In Ruby 1.9 - -``` -gem install aws-sdk -``` - -### Example - -Next, set up credentials (in e.g. ``~/.aws/credentials``):: - - [default] - aws_access_key_id = YOUR_MINIO_ACCESS_ID - aws_secret_access_key = YOUR_MINIO_SECRET_KEY - -``` -#!/usr/bin/env ruby -require 'aws-sdk' - -s3 = Aws::S3::Client.new(endpoint: "http://127.0.0.1:9000/", - require_https_for_sse_cpk: false, - region: "minio") -resp = s3.list_buckets -resp.buckets.each do |bucket| - puts "#{bucket.name} => #{bucket.creation_date}" -end -``` - -#### NOTE: - -ruby ``aws-sdk`` requires region name should be set, please use any name which -makes sense. Specifically for this example we choose ``minio`` - -Grab it here [example-list-buckets.rb](https://github.com/minio/mc/blob/master/docs/sdks/ruby/example-list-buckets.rb) \ No newline at end of file diff --git a/docs/commands/sync.md b/docs/sync.md similarity index 61% rename from docs/commands/sync.md rename to docs/sync.md index cd3a36ca..adb5c727 100644 --- a/docs/commands/sync.md +++ b/docs/sync.md @@ -2,21 +2,25 @@ ```go NAME: - mc sync - Copies files and objects from single source to multiple destinations + mc sync - Copy files and folders from a single source to many destinations USAGE: - mc sync TARGET [TARGET...] + mc sync SOURCE TARGET [TARGET...] EXAMPLES: - 1. Sync an object from local filesystem to Amazon S3 object storage + 1. Sync an object from local filesystem to Amazon S3 object storage. $ mc sync star-trek-episode-10-season4.ogg https://s3.amazonaws.com/trekarchive - 2. Sync a bucket recursively from Minio object storage to multiple buckets on Amazon S3 object storage + 2. Sync a bucket recursively from Minio object storage to multiple buckets on Amazon S3 object storage. $ mc sync https://play.minio.io:9000/photos/2014... https://s3.amazonaws.com/backup-photos https://s3.amazonaws.com/my-photos - 3. Copy a local folder recursively to Minio object storage and Amazon S3 object storage + 3. Sync a local folder recursively to Minio object storage and Amazon S3 object storage. $ mc sync backup/... https://play.minio.io:9000/archive https://s3.amazonaws.com/archive 4. Sync a bucket from aliased Amazon S3 object storage to multiple folders on Windows. $ mc sync s3:documents/2014/... C:\backup\2014 C:\shared\volume\backup\2014 + + 5. Sync a local file of non english character to Amazon s3 object storage. + $ mc sync 本語/... s3:mylocaldocuments C:\backup\2014 play:backup + ``` diff --git a/docs/commands/update.md b/docs/update.md similarity index 100% rename from docs/commands/update.md rename to docs/update.md