Transfer file with rclone

Introduction

This document provides a brief introduction to rclone, focusing on its installation and basic usage. Rclone is a command-line tool designed to manage and synchronize files across local systems and cloud storage providers.

How to Download

macOS

On macOS, the easiest way to install Rclone is using Homebrew. If Homebrew is installed, run:

brew install rclone

Once the installation is complete, verify it with:

rclone version

Alternatively, you can download the precompiled binary from the official website (see Windows section).

Windows

On Windows, rclone is distributed as a precompiled binary. Before downloading it, identify your system architecture to select the correct release. To check the architecture, open Command Prompt and run:

echo %PROCESSOR_ARCHITECTURE%

Once the architecture is known, visit the official download page: https://rclone.org/downloads/ and download the archive corresponding to your system (for example, Windows 64-bit).

Rclone releases for Windows and MacOS
rclone releases for Windows and MacOS

After downloading:

  1. Extract the archive.
  2. Place the rclone.exe binary in a directory included in the system PATH environment variable (e.g. C:\Windows or a custom tools directory).
  3. Verify the installation by running:
rclone version

Linux/macOS/BSD systems

On Unix-like systems, rclone provides an official installation script that automatically detects the operating system and architecture. To install rclone, run:

sudo -v ; curl https://rclone.org/install.sh | sudo bash

The script will download the correct binary for the system and install it under /usr/bin/rclone (or equivalent) setting appropriate permissions.

Connecting with a remote server

Open a shell and run:

rclone config
rclone config
rclone config

Then insert n to name a new connection:

choose an alias
choose an alias

Insert the number corresponding to your remote service. Make sure you select the correct number for the service, as the list may change! (e.g. 22 for GoogleDrive or 14 for Dropbox):

choose the remote storage service
choose the remote storage service

Then press Enter, leaving client_id empty:

Google Drive selection
Google Drive selection

Then press Enter, leaving client_secret empty:

leave empty and press enter
leave empty and press enter

Select Full access all files (1):

scope selection
scope selection

Then press Enter, leaving service_account_file empty:

leave empty and press enter
leave empty and press enter

No advanced configuration is needed.

skip advanced configuration
skip advanced configuration

Now rclone checks whether a graphical interface is available. If you are running rclone on your laptop type y, otherwise if you are running rclone on a remote machine type n.

Run the following command on your PC:

rclone authorize "drive"
web browser authentication prompt
web browser authentication prompt

Authorize rclone to use your remote drive.

login into your account
login into your account

You should see this message:

Authorization obtained. Come back on your shell
authorization obtained: come back on your shell

Then copy the token generated locally on your PC:

Copy the token
copy the token

Paste it on the remote server. Then your configuration is done:

Save
save

And exit:

quit
quit

To list the files in your remote drive, run the following command:

rclone ls test:yourremotedirectory --drive-shared-with-me  # this flag is optional
list remote drive files
list remote drive files

You can now download your data:

rclone copy test:yourremotedirectory ./pathWhereYouWant --drive-shared-with-me # this flag is optional
how to download files from the remote drive to your folder
how to download files from the remote drive to your folder