Skip to content

Commit 6f6a9d4

Browse files
committed
chore(gen): s3 tools update (done)
1 parent 2f75b22 commit 6f6a9d4

File tree

2 files changed

+162
-49
lines changed

2 files changed

+162
-49
lines changed

local_404.txt

Whitespace-only changes.

storage/object/api-cli/managing-lifecycle-cliv2.mdx

Lines changed: 162 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: Manage object lifecycles in Scaleway Object Storage using CLI v2 commands.
88
tags: object storage object-storage rclone s3cmd minio client mc cliv2 cli scw
99
dates:
10-
validation: 2024-06-14
10+
validation: 2024-12-23
1111
posted: 2021-08-05
1212
categories:
1313
- storage
@@ -55,8 +55,8 @@ Run the following command in a terminal to preview the configuration file for Rc
5555
type = s3
5656
env_auth = false
5757
endpoint = s3.nl-ams.scw.cloud
58-
access_key_id = SCW85PRCA6HD4PDEWS5M
59-
secret_access_key = 8bd5d8ce-d476-4bd5-b97d-2d97e04c3c4d
58+
access_key_id = SCWEXAMPLED4PDEWS5M
59+
secret_access_key = example-d476-4bd5-b97d-2d97e04c3c4d
6060
region = nl-ams
6161
location_constraint =
6262
acl = private
@@ -78,11 +78,11 @@ Run the following command in a terminal to preview the configuration file for S3
7878
# Configuration file for s3cmd https://s3tools.org/s3cmd
7979
# Default location: $HOME/.s3cfg
8080
[default]
81-
access_key = SCW85PRCA6HD4PDEWS5M
81+
access_key = SCWEXAMPLED4PDEWS5M
8282
bucket_location = nl-ams
8383
host_base = s3.nl-ams.scw.cloud
8484
host_bucket = %(bucket)s.s3.nl-ams.scw.cloud
85-
secret_key = 12345678-1234-1234-4321-123456789123
85+
secret_key = example-d476-4bd5-b97d-2d97e04c3c4d
8686
use_https = True
8787
```
8888
</TabsTab>
@@ -93,14 +93,14 @@ Run the following command in a terminal to preview the configuration file for Mi
9393
```
9494
An output similar to the following displays:
9595
```
96-
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCW1111111111111","secretKey":"12345678-1234-1234-4321-123456789123","api":"S3v4"}}}
96+
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCWEXAMPLED4PDEWS5M","secretKey":"example-d476-4bd5-b97d-2d97e04c3c4d","api":"S3v4"}}}
9797
```
9898
</TabsTab>
9999
</Tabs>
100100

101101
## Installing a configuration file for Amazon S3-compatible tools (s3cmd, rclone, and mc)
102102

103-
The `scw object config install` allows you to create a configuration file for the selected third party tool based on your [AWS configuration](/storage/object/api-cli/object-storage-aws-cli/).
103+
The `scw object config install` allows you to create a configuration file for the selected third party tool based on your [Scaleway CLI configuration](/developer-tools/scaleway-cli/quickstart/).
104104

105105
<Message type="important">
106106
Creating a new configuration file using `scw object config install` will overwrite the existing one for the specified third party tool. To update an existing configuration, [generate a preview](#previewing-an-object-storage-configuration-file-for-the-scaleway-cli) and manually edit the configuration file.
@@ -133,7 +133,7 @@ Run the following command in a terminal to install a configuration file for `s3c
133133
```
134134
</TabsTab>
135135
<TabsTab label="MinIO Client (mc)">
136-
3. Run the following command in a terminal to install a configuration file for MinIO Client (mc):
136+
Run the following command in a terminal to install a configuration file for MinIO Client (mc):
137137

138138
```
139139
scw object config install type=mc
@@ -146,115 +146,228 @@ Run the following command in a terminal to install a configuration file for `s3c
146146
```
147147
</TabsTab>
148148
</Tabs>
149+
149150
## Creating an Object Storage bucket
150151

151152
<Tabs>
152153
<TabsTab label="Rclone">
153-
Run the following command in a terminal to create a bucket:
154+
1. Run the following command in a terminal to create a bucket:
154155

155156
```
157+
rclone mkdir scaleway:my-bucket
158+
```
159+
160+
2. Run the following command to list your newly created bucket:
156161

157162
```
163+
rclone lsd scaleway:
164+
```
158165

159166
An output similar to the following displays:
167+
```
168+
rclone lsd scaleway:
169+
-1 2022-06-04 14:38:03 -1 my-bucket
170+
-1 2023-12-23 12:10:57 -1 my-new-bucket
171+
```
172+
</TabsTab>
173+
<TabsTab label="S3cmd">
174+
Run the following command in a terminal to create a bucket:
160175

161176
```
177+
s3cmd mb s3://my-bucket
178+
```
162179

180+
An output similar to the following displays:
181+
```
182+
Bucket 's3://my-bucket/' created
163183
```
164184
</TabsTab>
165-
</Tabs>
166-
## Adding an object
167-
168-
<Tabs>
169-
<TabsTab label="Rclone">
185+
<TabsTab label="MinIO Client (mc)">
170186
Run the following command in a terminal to add an object to your bucket:
171-
172187
```
173-
188+
mc mb scaleway/my-bucket
174189
```
175190

176191
An output similar to the following displays:
177192

178193
```
194+
Bucket created successfully `scaleway/my-bucket`.
195+
```
196+
</TabsTab>
197+
</Tabs>
179198

199+
## Uploading an object to a bucket
200+
201+
<Tabs>
202+
<TabsTab label="Rclone">
203+
1. In a terminal, access the folder containing the file you want to upload, then run the following command:
204+
```
205+
rclone copy /path/to/object/my-object scaleway:my-bucket
206+
```
207+
2. Run the command below to list the object you just uploaded:
208+
```
209+
rclone ls scaleway:my-bucket
210+
```
211+
An output similar to the following displays:
212+
```
213+
0 my-object
180214
```
181215
</TabsTab>
182216
<TabsTab label="S3cmd">
183-
Run the following command in a terminal to add an object to your bucket:
217+
In a terminal, access the folder containing the file you want to upload, then run the following command:
184218

185219
```
186-
s3cmd put file /path/to/object/your-object s3://your-bucket/your-object`
220+
s3cmd put file /path/to/object/my-object s3://my-bucket/my-object
187221
```
188222

189223
An output similar to the following displays:
190224

191225
```
192-
upload: '/path/to/object/your-object' -> 's3://your-bucket/your-object' [1 of 1]
226+
upload: '/path/to/object/my-object' -> 's3://my-bucket/my-object' [1 of 1]
193227
3259 of 3259 100% in 0s 8.47 KB/s done
194228
```
195229
</TabsTab>
196230
<TabsTab label="MinIO Client ">
197-
Run the following command in a terminal to add an object to your bucket:
231+
In a terminal, access the folder containing the file you want to upload, then run the following command:
198232

199233
```
234+
mc cp /path/to/local/file/my-file alias/bucket-name
200235
```
201236

202237
An output similar to the following displays:
203238

204239
```
240+
.../my-file: 28 B / 28 B ░░░░░░░░░░░░░░░░░░░░░░▓
205241
```
206242
</TabsTab>
207243
</Tabs>
208244

245+
## Downloading an object from a bucket
209246

210-
## Removing an object from a bucket
211-
212-
Run the following command in a terminal to remove an object from your bucket:
213-
247+
<Tabs>
248+
<TabsTab label="Rclone">
249+
1. In a terminal, run the following command to download an object from a bucket:
214250
```
215-
s3cmd delete: s3://your-bucket/your-object
251+
rclone copy scaleway:my-bucket/my-object /path/to/destination
252+
```
253+
2. Run the command below to list the object you just downloaded:
254+
```
255+
ls /path/to/destination
216256
```
217-
218257
An output similar to the following displays:
219-
220258
```
221-
delete: 's3://your-bucket/your-object'
259+
my-object
260+
```
261+
</TabsTab>
262+
<TabsTab label="S3cmd">
263+
1. In a terminal, run the following command to download an object from a bucket:
264+
```
265+
s3cmd get s3://my-bucket/my-object /path/to/destination
266+
```
267+
2. Run the command below to list the object you just downloaded:
268+
```
269+
ls /path/to/destination
270+
```
271+
An output similar to the following displays:
272+
```
273+
my-object
274+
```
275+
</TabsTab>
276+
<TabsTab label="MinIO Client (mc)">
277+
1. In a terminal, run the following command to download an object from a bucket:
278+
```
279+
mc cp scaleway/my-bucket/my-object /path/to/destination
222280
```
281+
2. Run the command below to list the object you just downloaded:
282+
```
283+
ls /path/to/destination
284+
```
285+
An output similar to the following displays:
286+
```
287+
my-object
288+
```
289+
</TabsTab>
290+
</Tabs>
223291

224-
<Message type="note">
225-
For more information about removing objects, run the following command in your terminal:
226-
```
227-
s3cmd --help
228-
```
229-
</Message>
292+
## Removing an object from a bucket
293+
294+
<Tabs>
295+
<TabsTab label="Rclone">
296+
1. In a terminal, run the following command to remove an object from a bucket:
297+
```
298+
rclone delete scaleway:my-bucket/my-object
299+
```
300+
2. Run the command below to make sure the object has been removed:
301+
```
302+
rclone ls scaleway:my-bucket
303+
```
304+
The object no longer appears in the output.
305+
</TabsTab>
306+
<TabsTab label="S3cmd">
307+
1. In a terminal, run the following command to remove an object from a bucket:
308+
```
309+
s3cmd del s3://my-bucket/my-object
310+
```
311+
2. Run the command below to make sure the object has been removed:
312+
```
313+
s3cmd ls s3://my-bucket
314+
```
315+
The object no longer appears in the output.
316+
</TabsTab>
317+
<TabsTab label="MinIO Client (mc)">
318+
1. In a terminal, run the following command to remove an object from a bucket:
319+
```
320+
mc rm scaleway/my-bucket/my-object
321+
```
322+
2. Run the command below to make sure the object has been removed:
323+
```
324+
mc ls scaleway/my-bucket
325+
```
326+
The object no longer appears in the output.
327+
</TabsTab>
328+
</Tabs>
230329

231330
## Deleting an Object Storage bucket
232331

233332
<Message type="important">
234-
This action will delete every object stored inside your bucket. Your bucket name will no longer be yours, and other users will be able to use it.
333+
This action will delete every object stored inside your bucket. The bucket name will no longer be yours, and other users will be able to use it.
235334
</Message>
236335

237-
1. Run the following command in a terminal to display your buckets:
238-
336+
<Tabs id="delete_bucket">
337+
<TabsTab label="Rclone">
338+
1. In a terminal, run the following command to delete a bucket:
339+
```
340+
rclone purge scaleway:my-bucket
341+
```
342+
2. Run the command below to make sure the bucket has been deleted:
343+
```
344+
rclone lsd scaleway:
345+
```
346+
The bucket no longer appears in the output.
347+
</TabsTab>
348+
<TabsTab label="S3cmd">
349+
1. In a terminal, run the following command to delete a bucket:
350+
```
351+
s3cmd rb s3://my-bucket
352+
```
353+
2. Run the command below to make sure the bucket has been deleted:
239354
```
240355
s3cmd ls
241356
```
242-
243-
An output similar to the following displays:
244-
357+
The bucket no longer appears in the output.
358+
</TabsTab>
359+
<TabsTab label="MinIO Client (mc)">
360+
1. In a terminal, run the following command to delete a bucket:
245361
```
246-
2021-09-01 15:56 s3://your-bucket
362+
mc rb scaleway/my-bucket
247363
```
248-
249-
2. Run the following command in a terminal to delete a bucket:
250-
251-
`s3cmd rb s3://your-bucket`
252-
253-
An output similar to the following displays:
254-
364+
2. Run the command below to make sure the bucket has been deleted:
255365
```
256-
Bucket 's3://your-bucket/' removed
366+
mc ls scaleway
257367
```
368+
The bucket no longer appears in the output.
369+
</TabsTab>
370+
</Tabs>
258371

259372
<Message type="tip">
260373
For more information about the Amazon S3-compatible tools used in this documentation, refer to the official [rclone](https://rclone.org/docs/), [s3cmd](https://s3tools.org/s3cmd-howto), and [mc](https://github.com/minio/mc) documentation.

0 commit comments

Comments
 (0)