RClone

RClone is a command-line tool for synchronizing, backing up and managing files on over 70 cloud services (Google Drive, Dropbox, OneDrive, S3, etc.). It’s often dubbed the Swiss army knife of cloud storage.

You may find it on our interactive servers. To activate it during your session use Modules:

% module load DataManagement/rclone

and then configure it as explained on this page.

Installation

To install RClone on your workstation, go to the URL below:

  1. Download and extract RClone (example for Linux):

    % curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
    % unzip rclone-current-linux-amd64.zip
    % cd rclone-*-linux-amd64
    % cp rclone ~/bin/
    % chmod +x ~/bin/rclone
    
  2. Add the ~/bin folder to your PATH in ~/.bashrc, ~/.zshrc, etc.:

    % export PATH="$HOME/bin:$PATH"
    % source ~/.bashrc
    
  3. Verify the installation:

    % rclone version
    

Configuration & Encryption

To start the configuration:

% rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q>

RClone will guide you through setting up a remote server (cloud connection). Useful commands:

rclone listremotes

Lists the configured remotes.

rclone config show

Displays the current configuration (excluding passwords).

rclone config file

Shows the path to the rclone.conf file.

Example of rclone.conf file:

[<remote name>]
type = sftp
host = <hostname>
user = <username>
key_file = /home/user/.ssh/id_rsa
path = <backup path>
port = 22

Attention

The rclone.conf file contains your credentials. Never share it. Back it up securely. You may encrypt it if needed.

Adding Encryption

  1. Run the command rclone config

  2. Add a new remote of type crypt

  3. Choose an existing remote connection to encrypt

Important

You are solely responsible for your password or encryption key. If you lose it, your data will be permanently inaccessible.

GUI and command line usage

If you want to integrate the installation of RClone on your workstation with a graphical interface, please refer to the following page :

Commonly used commands

Command

Description

rclone help

Shows all available commands

rclone mount <remote>:<path> /mnt/<mount_point>

Mounts a cloud storage locally (Linux/macOS only)

rclone ls|lsd <remote>:<path>

Lists files / directories

rclone lsl <remote>:<path>

Detailed file listing

rclone tree <remote>:<path>

Shows the folder tree structure

rclone delete <remote>:<path>

Deletes files

rclone mkdir <remote>:<path>

Creates a folder

rclone rmdir <remote>:<path>

Deletes an empty folder

rclone purge <remote>:<path>

Deletes an entire folder

rclone size <remote>:<path>

Displays total size

rclone about <remote>:

Shows information about available space

rclone check <src> <dst>

Compares files between two locations

rclone copy|move <src> <dst>

Copies / Moves files from <src> to <dst>

rclone sync <src> <dst>

Synchronizes files. Deletes files not in <src>.

Troubleshooting

rclone: command not found

The binary is not in your PATH. Go back to the installation step and make sure to add ~/bin (or the Windows folder) to your PATH.

rclone cannot connect to the server

Check that your credentials are correct and that the remote is properly configured via rclone config.

I want to back up my configuration

Make a copy of the rclone.conf file (path shown via rclone config file).

I forgot my encryption password

Unfortunately, it is impossible to recover your data. You must create a new encrypted remote.