For more information about generating a configuration file, type the following command in your terminal:
scw object config get --help
Scaleway Object Storage is a service based on the Amazon S3 protocol. It allows you to store different types of objects (documents, images, videos, etc.) and distribute them instantly, anywhere in the world. You can create and manage your Object Storage resources from the console, or via the Scaleway Command Line Interface that uses external tools such as S3cmd, Rclone or MinIO Client (mc).
The Scaleway Command Line Interface (CLI) allows you to pilot your Scaleway infrastructure directly from your terminal, providing a faster way to administer and monitor your resources. Scaleway CLI is easy to set up and is an essential tool for operating efficiently in your cloud environment.
To complete the actions presented below, you must have:
The scw object config get
command allows you to output the content of the configuration file in a terminal and preview the different fields.
For more information about generating a configuration file, type the following command in your terminal:
scw object config get --help
Run the following command in a terminal to preview the configuration file for Rclone:
scw object config get type=rclone
An output similar to the following displays:
# Generated by scaleway-cli command# Configuration file for rclone https://rclone.org/s3/#scaleway# Default location: $HOME/.config/rclone/rclone.conf[scaleway]type = s3env_auth = falseendpoint = s3.nl-ams.scw.cloudaccess_key_id = SCWEXAMPLED4PDEWS5Msecret_access_key = example-d476-4bd5-b97d-2d97e04c3c4dregion = nl-amslocation_constraint =acl = privateforce_path_style = falseserver_side_encryption =storage_class =
Run the following command in a terminal to preview the configuration file for S3cmd:
scw object config get type=s3cmd
An output similar to the following displays:
# Generated by scaleway-cli command# Configuration file for s3cmd https://s3tools.org/s3cmd# Default location: $HOME/.s3cfg[default]access_key = SCWEXAMPLED4PDEWS5Mbucket_location = nl-amshost_base = s3.nl-ams.scw.cloudhost_bucket = %(bucket)s.s3.nl-ams.scw.cloudsecret_key = example-d476-4bd5-b97d-2d97e04c3c4duse_https = True
Run the following command in a terminal to preview the configuration file for MinIO Client (mc):
scw object config get type=mc
An output similar to the following displays:
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCWEXAMPLED4PDEWS5M","secretKey":"example-d476-4bd5-b97d-2d97e04c3c4d","api":"S3v4"}}}
The scw object config install
allows you to create a configuration file for the selected third party tool based on your Scaleway CLI configuration.
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 and manually edit the configuration file.
Run the following command in a terminal to install a configuration file for Rclone:
scw object config install type=rclone
An output similar to the following displays:
Configuration file successfully installed at /Users/yourusername/.config/rclone/rclone.conf.
Run the following command in a terminal to install a configuration file for s3cmd
:
scw object config install type=s3cmd
An output similar to the following displays:
Configuration file successfully installed at /Users/yourusername/.s3cfg.
Run the following command in a terminal to install a configuration file for MinIO Client (mc):
scw object config install type=mc
An output similar to the following displays:
Configuration file successfully installed at /Users/yourusername/.mc/config.json.
Run the following command in a terminal to create a bucket:
rclone mkdir scaleway:my-bucket
Run the following command to list your newly created bucket:
rclone lsd scaleway:
An output similar to the following displays:
rclone lsd scaleway:-1 2022-06-04 14:38:03 -1 my-bucket-1 2023-12-23 12:10:57 -1 my-new-bucket
Run the following command in a terminal to create a bucket:
s3cmd mb s3://my-bucket
An output similar to the following displays:
Bucket 's3://my-bucket/' created
Run the following command in a terminal to add an object to your bucket:
mc mb scaleway/my-bucket
An output similar to the following displays:
Bucket created successfully `scaleway/my-bucket`.
rclone copy /path/to/object/my-object scaleway:my-bucket
rclone ls scaleway:my-bucket
0 my-object
In a terminal, access the folder containing the file you want to upload, then run the following command:
s3cmd put file /path/to/object/my-object s3://my-bucket/my-object
An output similar to the following displays:
upload: '/path/to/object/my-object' -> 's3://my-bucket/my-object' [1 of 1]3259 of 3259 100% in 0s 8.47 KB/s done
In a terminal, access the folder containing the file you want to upload, then run the following command:
mc cp /path/to/local/file/my-file alias/bucket-name
An output similar to the following displays:
.../my-file: 28 B / 28 B ░░░░░░░░░░░░░░░░░░░░░░▓
rclone copy scaleway:my-bucket/my-object /path/to/destination
ls /path/to/destination
my-object
s3cmd get s3://my-bucket/my-object /path/to/destination
ls /path/to/destination
my-object
mc cp scaleway/my-bucket/my-object /path/to/destination
ls /path/to/destination
my-object
rclone delete scaleway:my-bucket/my-object
rclone ls scaleway:my-bucket
s3cmd del s3://my-bucket/my-object
s3cmd ls s3://my-bucket
mc rm scaleway/my-bucket/my-object
mc ls scaleway/my-bucket
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.
rclone purge scaleway:my-bucket
rclone lsd scaleway:
s3cmd rb s3://my-bucket
s3cmd ls
mc rb scaleway/my-bucket
mc ls scaleway