Rclone brands themselves as “rsync for cloud storage”, and with its versatility and the number of providers it supports I’m inclined to believe them.
The setup I describe below is one that I use as a component of my backup process. It’s an automated, off-site, encrypted copy of my Documents folder from early in the morning before I start my day. It’s not meant to be a primary recovery source, but will be there if I need it.
The short of it is that I can sync my Documents directory to a Backblaze storage bucket with a single command line which I then pop into a script file that gets executed by cron every morning.
I chose Backblaze based on it’s reputation and price. They have a solid reputation and B2 is their business storage product. As for pricing, the comparison can be seen here.
Start by Logging into Backblaze, navigating to Buckets, and creating a new bucket. Give it a unique name and ensure it’s private. I chose to call mine “Desktop-1810-Documents”.
Now click the link to “Show Account ID and Application Key”. Under “Add Application Key” create a new key with access to only the bucket you just created. Copy the Application Key it shows you at the end, you won’t see it again and will have to create a new Application Key if you lose it or need to change it in the future.
Compare your package version to the latest available from the Rclone website and then either install the package repository version or follow the instructions for the scripted install from their website.
Open a command prompt and type rclone config. We will start by creating a “backblaze” container pointing to our B2 bucket.
Select ‘n’ for a new remote and name it “backblaze”.
Use the bucket applicationKeyId as the account and the Application Key itself as the key. Do not use your actual Account ID listed at the top of the Buckets page.
Now decide if you’d like to have files permanently deleted when you delete them from your local machine. Skip the advanced config (select ‘n’) and then review and finalize your settings.
Verify it worked with rclone lsd backblaze: The output should be the name of the B2 bucket.
Now we’re going to create an encrypted remote named “encrypted_b2” inside our backblaze remote.
Run rclone config again and select ‘new remote’. This time call it “encrypted_b2” and select the Encrypt/Decrypt a remote option from the list of remotes.
It will now ask for the name of the remote to encrypt. Here type in backblaze: followed by the B2 Bucket name from above. In my case this would be backblaze:Desktop-1810-Documents
Answer the remaining questions about encrypting file names and complete the wizard.
Your remote is now configured and all of your backup destinations should point to encrypted_b2.
We’re now ready to perform the first sync.
rclone sync -v /home/user/Documents/ encrypted_b2:/Documents/
Once completed (and after a few minutes) you can go back to the Backblaze B2 website, click on the Bucket, and you should see one high-level folder possibly with the name encrypted depending on your earlier choice.
Congratulations, your files are now backed-up securely offsite at minimal cost!
Now paste that line into a text file, name it with a .sh extension, make it executable, and schedule it with cron.
To restore files you would just initiate a sync in the opposite direction.
rclone sync -v encrypted_b2:/Documents/ /home/user/Desktop/restoredDocs/
As a nice bonus Rclone also gives you the ability to mount a remote B2 bucket as a local drive with the rclone mount command.