To access CloudStor from a UNIX command line, you will require a WebDAV client on the host and a CLI tool.
Supported CLI tools
Rclone
Prerequisites
Before setting up Rclone:
- Find your WebDAV URL.
- Set up an app password that you’ll only use for Rclone on your current machine.
Find your WebDAV URL
- Open CloudStor in your web browser and log in.
- Click
and scroll down to the WebDAV section.
- Copy the address displayed in this field.
Configure rclone
To set up rclone to connect to your CloudStor drive:
- Navigate to the rclone install directory and run
rclone config
. - Enter
n
to create a new remote server. - Enter
CloudStor
at the name prompt. - Enter
webdav
at the Storage prompt. - Paste the URL you copied from CloudStor settings at the url prompt.
- Enter
ownCloud
at the vendor prompt. - Enter your institute username at the user prompt. This is typically your institute email address.
- Enter
y
at the pass prompt. - Enter your app password for rclone at the password prompt.
- Enter your app password again to confirm it.
- Press Enter at the bearer_token prompt.
- Enter
n
at the Edit advanced config? question. - Check the configuration details and enter
y
if they look correct.
If the configuration details are incorrect, entere
to go through each configuration option again. - Enter
q
to finish the configuration.
View a list of files
Rclone ls CloudStor:/<folder>
The rclone ls command gives you a listing of all files in the CloudStor folder that you specify. For example, if you run rclone ls CloudStor:/exercise_tolerance_study
, rclone will return the names of all files in the exercise_tolerance_study folder on your CloudStor drive.
To view the names of all files on your CloudStor drive, use rclone ls CloudStor:
Transfer files between your machine and CloudStor
rclone copy <source> <destination>
The rclone copy command copies files from your local machine to CloudStor, or from CloudStor to your local machine.
The parameters you’ll need are:
<source>
: Where the files currently are.<destination>
: Where you want the files to be copied to.
Optional parameters are:
--progress
: See real-time updates on how the file copying is progressing.--transfers <number>
: Specify how many files can be copied at the same time. The default is 4.--create-empty-src-dirs
: If you want rclone to preserve the folder structure from the source, even if folders are currently empty.--checkers <number>
: Specify how many files and folders rclone can check for updates at once. The default is 8.
Examples
rclone copy --progress --transfers 8 ~/mydocs/ CloudStor:/test
will upload all files in your mydocs folder to your test folder on CloudStor.
rclone copy --progress --transfers 8 CloudStor:/test ~/testdata/
will download all files in your test folder on CloudStor to your local testdata folder.
Wrapper script for rclone
You can download a wrapper script for rclone that automates some of the file transfer work.
Features:
- Automatic retry failed uploads.
- Handle data sets with a large number of directories.
- Tuned default values for smooth uploads.