Title: Port of the week: rclone
Author: Solène
Date: 28 October 2020
Tags: portoftheweek
Description:
New **Port of the Week** after 3 years! I never thought it was so long
since last blog post about slrn.
This post is about the awesome **rclone** program, written in Go and
available on most popular platforms (including OpenBSD!). I will
explain how to configure it from the interactive command, from file
and what you can do with rclone.
**rclone** can be see as a rsync on steroids which supports lot of
Cloud backend and also support creating an encrypted data repository
over any backend (local file, ftp, sftp, webdav, Dropbox, AWS S3,
etc...).
It's **not** a automatic synchronization tool or a **backup**
software. It can copy files from A to B, synchronize two places
(can be harmful if you don't pay attention).
Let's see how to use it with an ssh server on which we will
create an encrypted repository to store important data.
[Official documentation](https://rclone.org/)
## Installation
Most of the time, run your package manager to install `rclone`.
It's a single binary.
## Interactive configuration
*You can skip this LONG section if you want to learn what rclone
can do and how to configure it in a 10 lines files.*
There is a parameter to have a question / answer interface to
configure your repository, using `rclone config`.
I'll make a full walkthrough to enable an encrypted repository
because I struggled to understand the logic behind rclone when I
started using it.
Let's start. I'll create an encrypted destination on my local NAS
which doesn't have full disk encryption, so anyone who access the
system won't be able to read my data. First, this will require to
set up an sftp repository and then an encrypted repository using the
previous one as a backend.
Let's create a new config named `home_nas`.
$ rclone config
2020/10/27 21:30:48 NOTICE: Config file
"/home/solene/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> home_nas
We want the storage type 29, "SSH/SFTP" (I removed all 50+ others
storages for readability).
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
[...]
29 / SSH/SFTP Connection
\ "sftp"
[...]
Storage> 29
My host is 192.168.1.200
** See help for sftp backend at: https://rclone.org/sftp/ **
dataswamp.org:70 /~solene/article-portoftheweek-rclone:84: port field too long