Rclone and Swestore
A powerful complement to the ARC clients is the rclone tool — a command-line tool supporting file transfers to and from a multitude of storage resources and protocols. It is something of a "Swiss Army knife of cloud storage".
Rclone can help with the following tasks:
- Backup (and encrypt) files to cloud storage
- Restore (and decrypt) files from cloud storage
- Mirror cloud data to other cloud services or locally
Configure Rclone
To use rclone with Swestore it must first be configured. Run rclone config and follow the numbered steps:
nfor New remoteswestorefor namewebdavfor Storage (or the corresponding number in the list)https://webdav.swestore.sefor urlotherfor vendor (or the corresponding number in the list)- Press
Enterfor user (leave blank) nfor "No, leave this optional password blank"- Press
Enterfor bearer_token nfor "Edit advanced config?"yif the resulting config looks correct, otherwiseeto edit againqto Quit config
The recommended way of using rclone with Swestore is with certificates and a proxy certificate. Specify the certificate locations on the command line:
To avoid typing this every time, create a command alias:
echo 'alias rclone-cert="rclone --client-cert=/tmp/x509up_u${UID} --client-key=/tmp/x509up_u${UID}"' >> ~/.bashrc
The following examples use rclone-cert as the shorter alias.
Listing directories and files
rclone-cert lsd swestore:/snic/storage-training
-1 2022-02-14 16:44:22 -1 Course
-1 2022-03-14 22:08:12 -1 newdir
rclone-cert ls swestore:/snic/storage-training
116876 Course/apply_storage1.png
131456 Course/apply_storage2.png
139240 Course/apply_storage3.png
Copying files
Copy a single file:
Copy a directory recursively:
rclone-cert copy /home/bmjl/Courses/storage-training/examples swestore:/snic/storage-training/examples
Copy recursively with progress display:
rclone-cert copy -P /home/bmjl/Courses/storage-training/examples swestore:/snic/storage-training/examples
Transferred: 338.249 MiB / 1.894 GiB, 17%, 52.625 MiB/s, ETA 30s
Transferred: 75 / 407, 18%
Elapsed time: 6.5s
File operations
Create a directory:
Remove a file:
Remove a directory:
Remove all files in a directory:
Author: (LUNARC)
Last Updated: 2022-10-05