From f07a9d98260f0c52c3df629b4c9995a201ee1cca Mon Sep 17 00:00:00 2001 From: Fulvio Galeazzi <fulvio.galeazzi@garr.it> Date: Thu, 28 Apr 2022 10:26:26 +0200 Subject: [PATCH] 2022-04-28: FG; Create separate ObjectStore section in FAQ, added s3cmd. --- ...{s3fs_quick_tutorial.rst => s3_quick_tutorial.rst} | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename web/support/kb/objstore/{s3fs_quick_tutorial.rst => s3_quick_tutorial.rst} (97%) diff --git a/web/support/kb/objstore/s3fs_quick_tutorial.rst b/web/support/kb/objstore/s3_quick_tutorial.rst similarity index 97% rename from web/support/kb/objstore/s3fs_quick_tutorial.rst rename to web/support/kb/objstore/s3_quick_tutorial.rst index ad72ccb7..c80310b5 100644 --- a/web/support/kb/objstore/s3fs_quick_tutorial.rst +++ b/web/support/kb/objstore/s3_quick_tutorial.rst @@ -4,8 +4,8 @@ S3 interface to object storage Instead of `Rclone <https://cloud.garr.it/support/kb/openstack/rclone_quick_tutorial/>`_, we can use s3 APIs to connect to object storage. You may use: -* `s3cmd`_ to manipulate buckets (create, get/put - objects) from command line + +* `s3cmd`_ to manipulate buckets (create, get/put objects) from command line * `s3fs <https://github.com/s3fs-fuse/s3fs-fuse>`_ to mount containers as filesystems @@ -51,33 +51,40 @@ Short summary of most common commands, for more information please visit the `s3cmd`_ page. List contents:: + $ s3cmd ls 2022-04-21 10:31 s3://fulvio Create new bucket:: + $ s3cmd mb s3://mynewbucket/ Bucket 's3://mynewbucket/' created Put file:: + $ s3cmd put testsmallfile s3://mynewbucket/ upload: 'testsmallfile' -> 's3://mynewbucket/testsmallfile' [1 of 1] 10485760 of 10485760 100% in 0s 30.37 MB/s done Recursive copy, put whole directory (note missing trailing '/'):: + $ s3cmd put -r testdir s3://mynewbucket/ upload: 'testdir/aRandomFile.png' -> 's3://mynewbucket/testdir/aRandomFile.png' [1 of 1] 67819 of 67819 100% in 0s 1577.91 kB/s done Get a file (destination file name can be omitted, default to same name as remote):: + $ s3cmd get s3://mynewbucket/testdir/aRandomFile.png copyOfRandomFile.png download: 's3://mynewbucket/testdir/aRandomFile.png' -> 'copyOfRandomFile.png' [1 of 1] 67819 of 67819 100% in 0s 3.05 MB/s done Delete a file (enable recursion with '-r'):: + $ s3cmd del s3://mynewbucket/testdir/aRandomFile.png delete: 's3://mynewbucket/testdir/aRandomFile.png' Delete bucket (must be empty):: + $ s3cmd rb s3://mynewbucket Bucket 's3://mynewbucket/' removed -- GitLab