Transfer files with rclone

Data transfers with rclone

You can transfer data to an external destination (e.g. file server with SSH access, storage cloud, etc), over the network or to attached storage, using rclone. It is similar to rsync but can store to a wide variety of storage clouds, and optionally encrypt your data.

Types of storage destinations

See configuration instructions for rclone (e.g. for S3 and SFTP).

Tutorial

  1. Download and install rclone

    Follow Installation instructions on the rclone site. You can use Homebrew to install on MacOS: brew install rclone.

  2. Encrypt config file

    This will encrypt your config file. Store the password in 1Password, MacOS Keychain or equivalent password manager.

  • run rclone config
  • select Set configuration password (s)
  • select Add Password (a)
  • enter the password and Quit to main menu (q)
  1. Create Dropbox backend
rclone config create box123 dropbox

This will use the browser to get you to authorize the rclone application to access your Dropbox account.

  1. Create crypt backend

    • run rclone config
    • select New Remote (n)
    • name: crypt-box123
    • storage: crypt
    • remote: box123:encrypted
    • filename_encryption: standard
    • directory_name_encryption: true
    • enter the following responses twice (for encryption and for salt):
      • select Generate random password (g)
      • bits: 1024
      • use password: y
    • select Yes this is OK (y)
    • select Quit to main menu (q)

    Note: this will store encrypted files into the encrypted directory inside Dropbox.

  2. Copy to backend

    To send files to the backend, use the copy command:

 rclone copy /tmp/file1 crypt-box123:encrypted

You can verify that the file is there with rclone ls crypt-box123:encrypted. You can also verify that there’s an encrypted file by going to your Dropbox and looking inside the encrypted directory.

  1. Copy from backend

    To retrieve files from the encrypted backend, simply reverse the source and destination in the copy command:

 rclone copy crypt-box123:encrypted/file1 /tmp/file1-recovered

You can verify that the file is identical (diff /tmp/file1 /tmp/file1-recovered).