Update docs/* remove stale documentation

This commit is contained in:
Harshavardhana
2015-06-10 18:34:46 -07:00
parent 8ad8fde146
commit 8befc50050
21 changed files with 124 additions and 340 deletions
+3 -3
View File
@@ -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
`,
}
+24
View File
@@ -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
```
+23
View File
@@ -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/本語
```
-20
View File
@@ -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
```
-19
View File
@@ -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
```
-38
View File
@@ -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/
```
-19
View File
@@ -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
```
-1
View File
@@ -1 +0,0 @@
../CONTRIBUTING.md
+9 -5
View File
@@ -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/本語
```
-61
View File
@@ -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 |
+37
View File
@@ -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
```
+19
View File
@@ -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
```
-33
View File
@@ -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);
});
-49
View File
@@ -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)
-6
View File
@@ -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)
-34
View File
@@ -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)
-10
View File
@@ -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
-37
View File
@@ -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)
+9 -5
View File
@@ -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
```