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 login servers. To activate it during your session use Modules:
% module load DataManagement/rclone
and then configure it as explained on this page.
Installation
Please find below some tips to install RClone on your workstation depending on your OS:
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
Add the
~/binfolder to yourPATHin~/.bashrc,~/.zshrc, etc.:% export PATH="$HOME/bin:$PATH" % source ~/.bashrc
Verify the installation:
% rclone version
Download the appropriate ZIP archive and extract it (to
C:\Users\<your_name>\rclone\for example),Open a terminal (CMD or PowerShell), then run:
% cd C:\Users\<your_name>\rclone\ % .\rclone.exe version
(Optional): Add the folder to the user’s
PATHto use RClone from anywhere.
For more information, please check the official download page.
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 listremotesLists the configured remotes.
rclone config showDisplays the current configuration (excluding passwords).
rclone config fileShows the path to the
rclone.conffile.
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
Run the command
rclone configAdd a new remote of type
cryptChoose 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
rclone helpShows 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.conffile (path shown viarclone config file).- I forgot my encryption password
Unfortunately, it is impossible to recover your data. You must create a new encrypted remote.