Rclone additional commands

Follow the Getting Started guide to setup Rclone.

The follow are additional commands or options you can consider when using Rclone

Configuration password

For additional security, you should consider using the s) Set configuration password option. It will encrypt the rclone.conf configuration file. This way secrets like the Create Access Grant in CLI, the encryption passphrase, and the access grant can't be easily stolen.

Create a Bucket

Use the mkdir command to create new bucket, e.g., mybucket.

rclone mkdir waterbear:mybucket
rclone mkdir waterbear:mybucket

List All Buckets

Use the lsf command to list all buckets.

Note the colon (:) character at the end of the command line.

rclone lsf waterbear:
rclone lsf waterbear:

Delete a Bucket

Use the rmdir command to delete an empty bucket.

rclone rmdir waterbear:mybucket
rclone rmdir waterbear:mybucket

Use the purge command to delete a non-empty bucket with all its content.

rclone purge waterbear:mybucket
rclone purge waterbear:mybucket

Upload Objects

Use the copy command to upload an object.

rclone copy --progress ~/Videos/myvideo.mp4 waterbear:mybucket/videos/
rclone copy --progress ~/Videos/myvideo.mp4 waterbear:mybucket/videos/

The --progress flag is for displaying progress information. Remove it if you don't need this information.

Use a folder in the local path to upload all its objects.

rclone copy --progress ~/Videos/ waterbear:mybucket/videos/
rclone copy --progress ~/Videos/ waterbear:mybucket/videos/

Only modified files will be copied.

List Objects

Use the ls command to list recursively all objects in a bucket.

rclone ls waterbear:mybucket
rclone ls waterbear:mybucket

Add the folder to the remote path to list recursively all objects in this folder.

rclone ls waterbear:mybucket/videos/
rclone ls waterbear:mybucket/videos/

Use the lsf command to list non-recursively all objects in a bucket or a folder.

rclone lsf waterbear:mybucket/videos/
rclone lsf waterbear:mybucket/videos/

Download Objects

Use the copy command to download an object.

The --progress flag is for displaying progress information.

Using --disable-http2 with rclone for Storj is recommended for increased transfer speeds by avoiding HTTP/2 specific issues.

rclone copy --disable-http2 --progress waterbear:mybucket/videos/myvideo.mp4 ~/Downloads/
rclone copy --disable-http2 --progress waterbear:mybucket/videos/myvideo.mp4 ~/Downloads/

Use a folder in the remote path to download all its objects.

rclone copy --progress waterbear:mybucket/videos/ ~/Downloads/
rclone copy --progress waterbear:mybucket/videos/ ~/Downloads/

Delete Objects

Use the deletefile command to delete a single object.

rclone deletefile waterbear:mybucket/videos/myvideo.mp4
rclone deletefile waterbear:mybucket/videos/myvideo.mp4

Use the delete command to delete all object in a folder.

rclone delete waterbear:mybucket/videos/
rclone delete waterbear:mybucket/videos/

Use the size command to print the total size of objects in a bucket or a folder.

rclone size waterbear:mybucket/videos/
rclone size waterbear:mybucket/videos/

Sync Two Locations

Use the sync command to sync the source to the destination, changing the destination only. Doesn’t transfer unchanged files, testing by size and modification time or MD5SUM. Destination is updated to match source, including deleting files if necessary.

Since this can cause data loss, test first with the --dry-run flag to see exactly what would be copied and deleted.

rclone sync --progress ~/Videos/ waterbear:mybucket/videos/
rclone sync --progress ~/Videos/ waterbear:mybucket/videos/

The sync can also be done from Storj to the local file system.

rclone sync --progress waterbear:mybucket/videos/ ~/Videos/
rclone sync --progress waterbear:mybucket/videos/ ~/Videos/

Or between two Storj buckets.

rclone sync --progress waterbear-us:mybucket/videos/ waterbear-europe:mybucket/videos/
rclone sync --progress waterbear-us:mybucket/videos/ waterbear-europe:mybucket/videos/

Or even between another cloud storage and Storj.

rclone sync --progress s3:mybucket/videos/ waterbear:mybucket/videos/
rclone sync --progress s3:mybucket/videos/ waterbear:mybucket/videos/
Previous
Rclone