Max Farrior
by Max Farrior

Categories

  • ZFS NAS

Backup Software

I have been considering what software to use to access my data on my FreeNAS box. I have a desktop and and laptop that need access to the data. I am currently using Dropbox/OneDrive and that’s not terrible, but it’s a little manual, meaning that if I download a FLAC file, I have to manually move it to my Dropbox folder and then on my other machine, I have to manually copy the file out of the Dropbox directory. Also both Dropbox and Microsoft can read my data.

Also, for the time being, I am not going to ‘back up’ my data on my client machines (desktop and laptop). I am going to keep data in sync with my FreeNAS box and then back up my FreeNAS box. My data is still safe, but anything outside of ‘personal data’, such as programs or settings is not being backed up. I am okay with this for the time being, I will explore proper full-system backup solutions in the future.

Syncthing

I considered a few options such a Nextcloud/Owncloud and Seafile, but ultimately chose Syncthing. Syncthing literally keeps directories in sync on multiple machines. It operates peer-to-peer, so changes on any machines go straight to the others. Also, I did not really need any of the other features that Nextcloud/Owncloud provide like managing calendars, contacts, or any enterprise features.

So I installed Syncthing in a FreeNAS jail. A jail is a FreeBSD feature that is similar to a Linux Container (LXC) and OpenVZ containers. It’s essentially a seperate ‘space’ running on the same kernel. The jail has it’s own root directory, users, processes, etc. but it’s not a completely separate environment.

I want to mention that FreeNAS has a built-in plugin (ie preconfigured jails) for Syncthing. This would have made setup easier, but the plugin used a version of Syncthing that was about six months old. Just because I like new and shiny things, I decided to install it in a jail.

Once installed (which I have not described), I use the FreeNAS GUI to assign one of my datasets to the jail. Super easy.

Next, I installed a Syncthing clients on my desktop and laptop computers. Syncthing is written in Go, so literally the same code can be run on multiple operations systems. (Except for iOS, because Apple) After installation, Syncthing is configured completely from it’s web interface. The Linux client (Syncthing-GTK) and the Windows client (SyncTrayzor) pretty much just provide the web interface in a windowed form. The interface is consistent across devices, making setup easier.

One big feature of Syncthing is its security. Every device has a unique Device ID. The Device ID is also not sensitive, because you have to add new device on both sides. So to sync my FreeNAS box with my desktop, I input the desktop’s unique Device ID on the FreeNAS box and I give the FreeNAS box my desktop’s Device ID. A third-party would not be able to connect because I would have to add the third-party’s device ID.

With relatively little effort, all my devices recognized each other on my LAN. Data started flowing as all my data became synchronized.