Rclone is a really cool command line tool that can sync files and directories too and from many sources. A full list of sources can be found on their official website.
I personally use it for syncing local backups to Backblaze B2.
There are a few ways to install but I prefer the script install:
To install rclone on Linux/macOS/BSD systems, run:
$ curl https://rclone.org/install.sh | sudo bash
The easiest way to configure and get up and running is by:
$ rclone config
And for my case I follow the Backblaze B2 steps:
(Steps extracted from Restic's site)
No remotes found - make a new one
n) New remote
q) Quit config
Type of storage to configure.
Choose a number from below, or type in your own value
XX / Backblaze B2
Account ID or Application Key ID
Endpoint for the service - leave blank normally.
account = 123456789abc
key = 0123456789abcdef0123456789abcdef0123456789
y) Yes this is OK
e) Edit this remote
d) Delete this remote
This remote is called
remote and can now be used like this
See all buckets
$ rclone lsd remote:
Create a new bucket
$ rclone mkdir remote:bucket
List the contents of a bucket
$ rclone ls remote:bucket
Sync /home/local/directory to the remote bucket, deleting any excess files in the bucket.
$ rclone sync /home/local/directory remote:bucket
Anything you sync without encryption has the potential of being publicly available and read in clear text. I recommend using encryption on any data that is synced to a publicly accessible storage.
Additionally, when using B2 storage please understand their access rules so that you can keep the repository private.
Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated 💖! For feedback, please ping me on Twitter.