Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Back up data using the command line to Swiss Backup (CLI S3)

Update 09/01/2026

This guide details how to manually back up data using the command line interface (CLI) via the S3 Compatible protocol on Swiss Backup, the backup solution in a Swiss independent cloud.

 

Using an S3 location in the CLI

Prerequisites

  • Have an Infomaniak Swiss Backup space with an available device quota (minimum 1) for a Cloud backup.
  • Add 1 device of type Cloud to obtain the S3 Compatible settings.
  • Use an application of type Terminal (command-line interface, CLI / Command Line Interface) on your device.

Using a Terminal-type application (command-line interface, CLI) on your device:

  1. Install s3cmd, for example on Debian/Ubuntu:

    sudo apt install s3cmd

    or on macOS (with Homebrew):

    brew install s3cmd

    and for Windows, it is recommended to use S3Express, an open-source command-line tool (need help?).

  2. Enter the following command to configure the connection:

    s3cmd --configure
  3. Fill in the fields according to the information specific to your device (refer to this other guide):
    • Display name = choose a name for the storage.
    • AccessKey and SecretKey = the access keys generated from the email received from Infomaniak after creating the storage space.
    • Service point = for example https://s3.swiss-backup02.infomaniak.com (1)
    • Bucket name = default
    • Default region
    • S3 Endpoint: use the URL provided by Infomaniak
    • Use HTTPS: yes
    • HTTP Proxy server: leave blank unless a specific configuration is required
    • Signature version: force the use of v4
    • Path style: choose Yes if prompted
    • Test access: you can perform the test to validate the configuration

(1) The indication "//s3.swiss-backup02", "//s3.swiss-backup03" etc. changes depending on the cluster number indicated in the Manager under Cloud storage information in the "Location" section; and if your Swiss Backup device was created before October 2020, you will need to use https://swiss-backup.infomaniak.com/identity/v3.

Once completed, a configuration file will be saved (by default in ~/.s3cfg).

 

Start a copy to Swiss Backup

Here are some basic commands for interacting with Swiss Backup:

  • List the buckets: s3cmd ls
  • List the contents of a bucket: s3cmd ls s3://bucket-name
  • Send a file: s3cmd put example.txt s3://bucket-name/
  • Download a file: s3cmd get s3://bucket-name/example.txt
  • Synchronize a local directory to a bucket: s3cmd sync /path/local/ s3://bucket-name/

 

In case of problems

Following an update to the AWS CLI (Amazon Web Services Command Line Interface) tool, you may encounter an error when attempting to connect to or transfer data to a Swiss Backup S3 location:

Transferring payloads in multiple chunks using aws-chunked is not supported

This error is related to a transfer method used by AWS CLI (aws-chunked), which is not compatible with the Swiss Backup service.

Unfortunately, Infomaniak has no way to address this incompatibility, as it is related to the internal operation of the AWS CLI client, developed by Amazon.

To continue using Swiss Backup effectively via the command line, Infomaniak recommends using the open-source tool s3cmd, as described above in this guide, which is fully compatible with S3 locations.


Has this FAQ been helpful?