Friday, November 1, 2024
Google search engine
HomeData Modelling & AIBackup files to Scaleway Object Storage using AWS-CLI

Backup files to Scaleway Object Storage using AWS-CLI

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

Scaleway recently launched an Object Storage service with API  that is Amazon S3-compatible. This service is still in Beta stage but you can request for free early access. Cloud Object Storage gives you a simple way to store and distribute your content no matter the amount of data – Scale to Petabytes.

You can use Object Storage to store anything from system logs, backups, web content, API, libraries e.t.c. In this guide, I’ll take you through the setup of a bucket on Scaleway and uploading files to it using AWS-CLI.

Setting up Scaleway Object Storage

Below are the steps you need to follow to have a working Scaleway object store ready for file uploads.

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}

Step 1: Signup to scaleway

Create a scaleway account using the link https://cloud.scaleway.com/#/signup. You’ll need to set a billing method – [ Card payment ] while setting up the account.

Step 2: Create API Token

Once the account is created, proceed to create API token to be used in AWS CLI configuration section. Login to Scaleway dashboard and open the link https://cloud.scaleway.com/#/credentials

Click the “Create new token” button

scaleway create token 01 min

The secret key will be shown only once. Be careful and save it!

Step 3: Create a bucket on scaleway

Once you have API token generated, create a bucket that will store your files. For this, use the link https://cloud.scaleway.com/#/buckets

scaleway create bucket 02 min

Give the bucket a name and click the “Create Bucket” button.

scaleway create bucket min

Step 4: Install AWS-CLI

The next step is to install aws-cli and awscli-plugin-endpoint used to interact with Scaleway Object Storage service. The awscli-plugin-endpoint is a great plugin to help people more easily access third-party S3 providers.

Use pythonpip module manager to install the packages.

sudo pip3 install awscli
sudo pip3 install awscli-plugin-endpoint

Step 5: Configure AWS-CLI

Create ~/.aws/ directory that will store access information

mkdir ~/.aws/

Then create a configuration file ~/.aws/config with the following content

[plugins]
endpoint = awscli_plugin_endpoint

[default]
region = nl-ams
s3 =
  endpoint_url = https://s3.nl-ams.scw.cloud
  max_concurrent_requests = 100
  max_queue_size = 1000
s3api =
  endpoint_url = https://s3.nl-ams.scw.cloud

Get endpoint and region from the bucket name details page.

scaleway object bucket location min

Create the file~/.aws/credentials to store your Scaleway access credentials.

[default]
aws_access_key_id=<ACCESS_KEY>
aws_secret_access_key=<SECRET_KEY>

Set <ACCESS_KEY> and <SECRET_KEY> printed out in Step 2

Test connection to the Object store with your

$ aws s3 ls
2018-09-28 17:02:43 neveropen-backups

Try to upload a file

aws s3 cp neveropen.tar.gz s3://neveropen-backups/

Check the file to confirm it was uploaded.

$ aws s3 ls s3://neveropen-backups
2018-09-28 18:33:05 1389731840 neveropen.tar.gz

The files uploaded should be visible on Scaleway dashboard

scaleway bucket content min

I’ll prepare AWS S3 CLI cheat sheet for administering S3-compatible Object storage service. Until then, stay tuned and enjoy your time!

Also check Best secure Backup Application for Linux, macOS & Windows

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments