diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-03-17 22:44:35 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-03-17 22:44:35 +0100 |
commit | ea21c544343afeb37e96678089bcd535e64982a7 (patch) | |
tree | e7ec9ec9dae459aeb6a99b35c537d46745053ec0 /doc/book/src | |
parent | 1a5af9d1fc4ab4727f9747b0947d1a0c7e0002e7 (diff) | |
download | garage-ea21c544343afeb37e96678089bcd535e64982a7.tar.gz garage-ea21c544343afeb37e96678089bcd535e64982a7.zip |
Add handle files section to the doc
Diffstat (limited to 'doc/book/src')
-rw-r--r-- | doc/book/src/getting_started/files.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/book/src/getting_started/files.md b/doc/book/src/getting_started/files.md index c8042dd3..0e3939ce 100644 --- a/doc/book/src/getting_started/files.md +++ b/doc/book/src/getting_started/files.md @@ -1 +1,42 @@ # Handle files + +We recommend the use of MinIO Client to interact with Garage files (`mc`). +Instructions to install it and use it are provided on the [MinIO website](https://docs.min.io/docs/minio-client-quickstart-guide.html). +Before reading the following, you need a working `mc` command on your path. + +## Configure `mc` + +You need your access key and secret key created in the [previous section](bucket.md). +You also need to set the endpoint: it must match the IP address of one of the node of the cluster and the API port (3900 by default). +For this whole configuration, you must set an alias name: we chose `my-garage`, that you will used for all commands. + +Adapt the following command accordingly and run it: + +```bash +mc alias set \ + my-garage \ + http://172.20.0.101:3900 \ + <access key> \ + <secret key> \ + --api S3v4 +``` + +You must also add an environment variable to your configuration to inform MinIO of our region (`garage` by default). +The best way is to add the following snippet to your `$HOME/.bash_profile` or `$HOME/.bashrc` file: + +```bash +export MC_REGION=garage +``` + +## Use `mc` + +You can not list buckets from `mc` currently. + +But the following commands and many more should work: + +```bash +mc cp image.png my-garage/nextcloud-bucket +mc cp my-garage/nextcloud-bucket/image.png . +mc ls my-garage/nextcloud-bucket +mc mirror localdir/ my-garage/another-bucket +``` |