NavigationContentFooter
Jump toSuggest an edit

Managing Object Storage using the Scaleway CLI

Reviewed on 23 December 2024Published on 05 August 2021

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).

Scaleway Command Line Interface Overview

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.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • A valid API key
  • An Object Storage bucket
  • Installed and initialized the Scaleway CLI
  • Downloaded S3cmd, Rclone and MinIO Client (mc)

Previewing an Object Storage configuration file for the Scaleway CLI

The scw object config get command allows you to output the content of the configuration file in a terminal and preview the different fields.

Note

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 = s3
env_auth = false
endpoint = s3.nl-ams.scw.cloud
access_key_id = SCWEXAMPLED4PDEWS5M
secret_access_key = example-d476-4bd5-b97d-2d97e04c3c4d
region = nl-ams
location_constraint =
acl = private
force_path_style = false
server_side_encryption =
storage_class =

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

The scw object config install allows you to create a configuration file for the selected third party tool based on your Scaleway CLI configuration.

Important

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.

Creating an Object Storage bucket

  1. Run the following command in a terminal to create a bucket:

    rclone mkdir scaleway:my-bucket
  2. 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

Uploading an object to a bucket

  1. In a terminal, access the folder containing the file you want to upload, then run the following command:
    rclone copy /path/to/object/my-object scaleway:my-bucket
  2. Run the command below to list the object you just uploaded:
    rclone ls scaleway:my-bucket
    An output similar to the following displays:
    0 my-object

Downloading an object from a bucket

  1. In a terminal, run the following command to download an object from a bucket:
    rclone copy scaleway:my-bucket/my-object /path/to/destination
  2. Run the command below to list the object you just downloaded:
    ls /path/to/destination
    An output similar to the following displays:
    my-object

Removing an object from a bucket

  1. In a terminal, run the following command to remove an object from a bucket:
    rclone delete scaleway:my-bucket/my-object
  2. Run the command below to make sure the object has been removed:
    rclone ls scaleway:my-bucket
    The object no longer appears in the output.

Deleting an Object Storage bucket

Important

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.

  1. In a terminal, run the following command to delete a bucket:
    rclone purge scaleway:my-bucket
  2. Run the command below to make sure the bucket has been deleted:
    rclone lsd scaleway:
    The bucket no longer appears in the output.
Tip

For more information about the Amazon S3-compatible tools used in this documentation, refer to the official rclone, s3cmd, and mc documentation.

Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2025 – Scaleway