1
0
mirror of https://github.com/astaxie/cookbook.git synced 2025-08-08 09:42:04 +03:00

Doc: Realigned the content home and moved cookbook content inside docs directory. (#45)

This commit is contained in:
koolhead17
2016-07-24 19:16:16 -07:00
committed by Harshavardhana
parent 55a8a5bd21
commit 29546a45e8
16 changed files with 14 additions and 14 deletions

106
docs/rclone-with-minio.md Normal file
View File

@@ -0,0 +1,106 @@
# rclone with Minio Server [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
`rclone` is an open source command line program to sync files and
directories to and from cloud storage systems. It aims to be "rsync
for cloud storage".
This recipe describes how to use rclone with Minio Server.
## 1. Prerequisites
First install Minio Server from [minio.io](https://minio.io/).
## 2. Installation
Next install rclone from [rclone.org](http://rclone.org).
## 3. Configuration
When it configures itself Minio will print something like this
```sh
AccessKey: WLGDGYAQYIGI833EV05A SecretKey: BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF Region: us-east-1
Minio Object Storage:
http://127.0.0.1:9000
http://10.0.0.3:9000
Minio Browser:
http://127.0.0.1:9000
http://10.0.0.3:9000
```
You now need to configure those details into rclone.
Run `rclone config`, create a new remote called `minio` (or anything
else) of type `S3` and enter the details above something like this:
(Note that it is important to put the region in as stated above.)
```sh
env_auth> 1
access_key_id> WLGDGYAQYIGI833EV05A
secret_access_key> BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF
region> us-east-1
endpoint> http://10.0.0.3:9000
location_constraint>
server_side_encryption>
```
Which makes the config file look like this
```sh
[minio]
env_auth = false
access_key_id = WLGDGYAQYIGI833EV05A
secret_access_key = BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF
region = us-east-1
endpoint = http://10.0.0.3:9000
location_constraint =
server_side_encryption =
```
## 4. Commands
Minio doesn't support all the features of S3 yet. In particular it
doesn't support MD5 checksums (ETags) or metadata. This means rclone
can't check MD5SUMs or store the modified date. However you can work
around this with the `--size-only` flag of rclone.
Here are some example commands
List buckets
rclone lsd minio:
Make a new bucket
rclone mkdir minio:bucket
Copy files into that bucket
rclone --size-only copy /path/to/files minio:bucket
Copy files back from that bucket
rclone --size-only copy minio:bucket /tmp/bucket-copy
List all the files in the bucket
rclone ls minio:bucket
Sync files into that bucket - try with `--dry-run` first
rclone --size-only --dry-run sync /path/to/files minio:bucket
Then sync for real
rclone --size-only sync /path/to/files minio:bucket
See the [rclone web site](http://rclone.org) for more examples and docs.