Skip to main content

RClone

Rclone syncs your files to cloud storage

Installation

Ubuntu

sudo apt install rclone
Storj DCS

Manual: https://documentation.tardigrade.io/how-tos/sync-files-with-rclone 

Config

rclone config

n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

name> storjdcs


4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamho
st, IBM COS, Minio, etc)
Storage> 4 

10 / Any other S3 compatible provider
provider> 10

1 / Enter AWS credentials in the next step
env_auth> 1

access_key_id> Enter your <AccessKeyId>

secret_access_key> Enter your <SecretAccessKey>

1 / Use this if unsure. Will use v4 signatures and an empty region.
region> 1


endpoint> Enter the Storj DCS Gateway URL

location_constraint> Press Enter

acl> Press Enter

Edit advanced config? (y/n)
y/n> y

bucket_acl> Press Enter

upload_cutoff> 200M

chunk_size> 64M

disable_checksum> Press Enter

session_token> Press Enter

upload_concurrency> Press Enter

force_path_style> Press Enter

v2_auth> Press Enter


[storjdcs]
provider = Other
env_auth = false
access_key_id = xxxxx
secret_access_key = xxxxxxxxxxxxxxxxxxxx
endpoint = https://gateway.ap1.storjshare.io
upload_cutoff = 200M
chunk_size = 64M
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y


Remote config
Current remotes:

Name                 Type
====                 ====
storjdcs             s3

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
Create a Bucket
rclone mkdir storjdcs:raida_node17
List All Buckets
rclone lsf storjdcs:
rclone ls storjdcs:raida-nodes/R17/
Delete a Bucket
rclone rmdir storjdcs:mybucket

# Use the purge command to delete a non-empty bucket with all its content.
rclone purge storjdcs:mybucket
Upload files
# Upload the files in the directory 
rclone copy --progress /root/ADIAR/Nginx_MySQL/db/backup/ storjdcs:raida_nodes/R17/

Transferred:      518.759M / 518.759 MBytes, 100%, 511.778 kBytes/s, ETA 0s
Errors:                 0
Checks:                 0 / 0, -
Transferred:            5 / 5, 100%
Elapsed time:    17m17.9s
Housekeeping the files
# Delete the files older than 7 days
# Refer to https://rclone.org/flags/
rclone delete remote:dir --min-age 8d -v --dry-run

rclone delete storjdcs:raida-nodes/R17/ --exclude "{dump.sql,importTable.sql}" --min-age 8d -v --dry-run