Under the following link I have already described how I connected my Ubuntu server to the Wasabi Cloud via s3fs:
Ubuntu server and Wasabi Cloud with s3fs
The connection runs smoothly and files transfer well – if they are not too big! For example, I wanted to transfer a 400 GB file, the estimated transfer time was given as 77 days. Eventually, the transfer stopped by itself after some time without my intervention. So I was looking for another method capable of transferring larger files in an acceptable time. I wanted to try s5cmd because the reports about this programme sounded good. However, it is a little tricky to install the program under Ubuntu. You can't install sc5md directly, but have to do it via a programme from Anaconda. But even installing this programme required some searching and research on my part. First I went to the Anaconda website:
https://www.anaconda.com/products/distribution
There you can find the installers for Linux at the bottom: I copied the address of the first link (64-bit (x86) installer) to my clipboard. It read:
https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
I downloaded this sh file with wget:
wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
I execute the downloaded file with the bash command:
bash Anaconda3-2022.10-Linux-x86_64.sh
I have to press the Enter key a few times until I am asked whether I accept the licence conditions, which I confirm with "yes". It suggests home/MYUSERNAME/anaconda3 as the installation path, which I confirm. However, it is also possible to place Anaconda somewhere else. I am then asked if I want to initialise Anaconda3, which I confirm with
yes
which I confirm. Finally, I export the path so that Conda can be found:
export PATH=/home/MYUSERNAME/anaconda3/bin:$PATH
Now I can display the version number of Conda:
conda --version conda 22.9.0
Finally I can install s5cmd:
conda install -c conda-forge s5cmd
From here I can continue to follow the instructions published by Wasabi here:
https://wasabi-support.zendesk.com/hc/en-us/articles/360044600552-How-do-I-use-s5cmd-with-Wasabi-
I create the directory .aws in my home directory:
mkdir ~/.aws
In my Wasabi account, I create two keys under “Access Key”. On my server, I create a file in the .aws directory that should contain the two keys. The file itself should be called “credentials”:
vi ~/.aws/credentials
Now the vim editor should open and I copy the two keys into the file according to this scheme:
[default] aws_access_key_id = TH15ISN0T4R34LPU8K3Y aws_secret_access_key = th15i54Ls0n0t4rea1k3ySEcr3TeiTHeRn012340
Then I enter
s5cmd
and I get a list of commands that I can use to manage my bucket. I change to the .aws directory:
cd ~/.aws
To connect to my Wasabi Cloud, the storage region is now of interest. The different URLs of the regions can be found here:
Since I chose the Frankfurt am Main region, my URL is “s3.eu-central-2.wasabisys.com”. Now I have all the information to establish a connection and I can display my bucket with “ls”:
s5cmd --endpoint-url=https://s3.eu-central-2.wasabisys.com ls
Now my Wasabi bucket is displayed. I have given my bucket the name "wasabi-bucket1". I use this command to display the contents of my bucket:
s5cmd --endpoint-url=https://s3.eu-central-2.wasabisys.com ls s3://wasabi-bucket1
I create a test file
touch test.file
With
s5cmd --endpoint-url=https://s3.eu-central-2.wasabisys.com cp test.file s3://wasabi-bucket1/Backups/
I copy this file to the Wasabi Cloud in the “Backups” directory. If the directory did not exist before, it is created automatically. If I want to move or rename files or directories, I go to my server and connect to the Wasabi Cloud via s3fs and control everything from Midnight Commander.
Bemerkungen :