digiMoot:

FreeNAS: Setup Encrypted Cloud Backup

Cloud Encrypted Backup in FreeNAS
Setting up an encrypted cloud backup, which backs up your data off-site, is absolutely essential as part of a comprehensive backup plan for any data kept on your FreeNAS server, that you care about at all. Off-site backups protect your data in case of the catastrophic event: fire, flood, server explodes, earthquake, nuclear war, etc. This data is important to be kept off-site as many of these types of events will effect your entire home or even the city or region in which you live and so a cloud hosting service is a good choice for this.

However, as is often said, the cloud is just somebody else’s computer. This means that you need to assume that at least the cloud service provider can see and access your data and given the large and increasing number of data leaks, you should also assume that the entire internet and the whole world can also see your data. For this reason, any data you store online that you don’t want others to see potentially private data (financial information, resumes and work information, your curated porn collection, or your movies, tv and movie collections) you must encyrpt.

FreeNAS uses rclone to encrypt and backup your data to a cloud service, but thanks to the FreeNAS WebUI, encrypting your data and then backing it up to the cloud is pretty easy. Let’s get started.

This article is part of my series of FreeNas setup, configuration and install articles.

Generating Cloud Credentials

In this article, I will be using Dropbox, but this would be similar for BackBlaze, GoogleDrive, etc.

You will need to login to your Dropbox account and then click on the three dots on the lower right-hand side and choose Developers. Click Create apps to create a new app (which will let you access an access token) and in step 1, select ‘Dropbox API’, step 2, select ‘Full Dropbox’, and step 3, select a unique name for your app. See the image below:

FreeNAS DropBox Sync Create the App
FreeNAS DropBox Sync Create the App

Once done, this will take you to the settings page for your new app. On this page, under the Generated access token section, you will need to click the generate button to create an access token as per the image below.

FreeNAS DropBox Sync Generate-Access
FreeNAS DropBox Sync Generate-Access

Adding Cloud Credentials to FreeNAS

You will now need to add this token you just generated through your Dropbox app to the FreeNAS server Cloud Crediential section. Login to your FreeNAS WebUI and go to ‘Settings -> Cloud Credentials’. Click the add button at the top right and enter the name of the cloud credential, select the provider (Dropbox in this case), and paste your access token. When done click save.

FreeNAS DropBox Sync Input-Access-Token
FreeNAS DropBox Sync Input-Access-Token

Setting up a Cloud Sync Task with Encryption

Now we need to setup a task using these credentials. Go to Tasks -> Cloud Sync Tasks. Click ‘Add’ at the top right of the page. In this screen you will need to add a description of the task (e.g. Porn Cloud Backup), select the direction of the backup (push sends to the cloud, pull grabs from the cloud), the credential we just setup above, the folder on the cloud to which you want to send your backup data, the folder containing the data you want to backup, and the transfer mode (Sync copies any changes from the source system to the destination, Copy copies new files. Files deleted on the host are not deleted on the destination, Move copies files to the destination, then deletes them from the source after the transfer is complete).

FreeNAS DropBox Sync Tasks
FreeNAS DropBox Sync Tasks

Next we need to enter in information for encryption of the files you need to enter both a password and a salt. Both should be very long and contain a variety of characters for protection. You will need to remember both the password and the salt for data recovery in the event your server is destroyed.

Finally, we create a schedule on which to run the task. Like in other FreeNAS tasks, this can be as frequent as you would like.

Setting up a Cloud Sync Task with Encryption

That’s it, you’re setup and ready to go. I would recommend setting up a simlar task with a ‘pull’ to ensure that the data is able to be restored. You are now setup with an encrypted cloud backup. Your data is safe on somebody else’s computer and encrypted to keep if from prying eyes. Lets hope that you never have to use this backup solution.

Happy backuping!

~Raze

Sources:
https://www.ixsystems.com/blog/dropbox-with-truenas-or-freenas/
https://www.youtube.com/watch?v=rlXXVN0FSog

Liked it? Take a second to support digiMoot on Patreon!

2 thoughts on “FreeNAS: Setup Encrypted Cloud Backup

  1. Hello,
    I tried to connect hubic in the webui with token access but it does not work. “Error: 2020/10/21 12:12:22 Failed to create file system for “remote:”: failed to configure Hubic: invalid character ‘w’ looking for beginning of value
    ”

    So i config directly rclone.conf. I succed connect and sync in command line but Nothing appears in the webui. Can you help me i dont know what’s wrong
    Thank you

  2. Hello,
    I tried to connect hubic in the webui with token access but it does not work. “Error: 2020/10/21 12:12:22 Failed to create file system for “remote:”: failed to configure Hubic: invalid character ‘w’ looking for beginning of value
    ”
    So i config directly rclone.conf. I succed connect and sync in command line but Nothing appears in the webui. Can you help me i dont know what’s wrong
    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *