Kennisbank

1.000 veelgestelde vragen, 500 tutorials en uitlegvideo's. Hier vind je alleen maar oplossingen!

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

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 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 a Terminal application (command line interface, CLI /Command Line Interface) on your device.

With a Terminal application (command line interface, CLI /Command Line Interface) 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. Enter 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 you 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 in the Cloud storage information under "Location"; 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 to interact with Swiss Backup:

  • List 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.

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

Link naar deze veelgestelde vragen: https://faq.infomaniak.com/1579


Is deze veelgestelde vragenlijst nuttig geweest?