To access CloudStor from a UNIX command line, you will require a WebDAV client on the host and a CLI tool.
Supported CLI tools
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.
To set up rclone to connect to your CloudStor drive:
- Navigate to the rclone install directory and run
nto create a new remote server.
CloudStorat the name prompt.
webdavat the Storage prompt.
- Paste the URL you copied from CloudStor settings at the url prompt.
ownCloudat the vendor prompt.
- Enter your institute username at the user prompt. This is typically your institute email address.
yat 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.
nat the Edit advanced config? question.
- Check the configuration details and enter
yif they look correct.
If the configuration details are incorrect, enter
eto go through each configuration option again.
qto 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.
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.
- Automatic retry failed uploads.
- Handle data sets with a large number of directories.
- Tuned default values for smooth uploads.