Run the following:
- install rclone
sudo apt install rclone -y
- Enter rclone configuring
rclone config
You will get
No remotes found – make a new one
n) New remote
s) Set configuration password
q) Quit config
- create new remote
n/s/q> n
choose the name
name> remote
The following will be shown
Type of storage to configure.
Enter a string value. Press Enter for the default (“”).
Choose a number from below, or type in your own value
We choose S3
Storage> s3
Then following will show
Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).
Only applies if access_key_id and secret_access_key is blank.
Enter a boolean value (true or false). Press Enter for the default (“false”).
Choose a number from below, or type in your own value
1 / Enter AWS credentials in the next step
\ “false”
2 / Get AWS credentials from the environment (env vars or IAM)
\ “true”
We are not going to use env auth so we choose
env_auth> false
- Contabo Auth
Now we need to get auth information from contabo
AWS Access Key ID.
Leave blank for anonymous access or runtime credentials.
Enter a string value. Press Enter for the default (“”).
Now we enter
access_key_id> “Contabo_Access_Key“
and
secret_access_key>Contabo_Secret_Key
and we leave region blank
then we choose contabo endpoint
endpoint> eu2.contabostorage.com
We choose n for location constrain
Then we get
Remote config
[remote]
provider = Other
env_auth = false
access_key_id = <ID>
secret_access_key = <Secret>
endpoint = eu2.contabostorage.com
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
We say yes
y/e/d> y
Then we close on next option
e/n/d/r/c/s/q> q
- Now we are ready to use rclone commands
- Make a new bucket
rclone lsd remote:
- List the contents of a bucket
rclone ls remote:bucket
- See all buckets
rclone lsd remote:
- Sync /home/dir to the remote bucket, deleting any excess files in the bucket.
rclone sync -i /home/dir remote:bucket