QNAP backup with CrashPlan

I do have a QNAP since a while. Over the time, I upgraded to larges system and I'm now using a 6 slots TVS-663 with §6Gig RAM. Why a so big machine ? I'm storing all my data on it, such as photos, official documents, scan of paper, work, etc. as well as running virtual machines. Even so my QNAP is configured with RAID, I'm hesitant to let all my precious data in only one place. What happens if my house burns or if I get stolen or vandalized ?

Therefore I wanted to have a strong backup solution. I went through different systems: QNAP is proposing a lot of them. However, all these systems are rather expensive when it comes to backup large amount of data (I do have several thousand photos). I was using crashplan on 3 PCs at home and I'm rather happy with this system. It is simple tu install and configure and, when it is running, I can forget it. It even allows to recover data wink. It's not a joke: some backup systems are so complex to use that recovering data is impossible mission.

Can crashplan work on a QNAP ?

crashplan has not been made to work on NAS or remote server so the question is justified. Basically, the crashplan backup software is divided into three parts:

  • A server, in charge of the backup job
  • A GUI, used to manage and configure the backup server
  • A storage location, where all the archived data are stored.

The good news is that all these different systems communicates together via IP: so it should be possible to backup a NAS with it. I dis some search on the Internet and discovered packages ready to be install on a NAS. At the beginning, it worked very well. However, after several weeks or even month, CrashPlan stopped to work. After detailed analysis, I notices that the automatic software upgrade did not work properly with QNAP packages and I had to completely re-install the software periodically. This was not satisfying: I noticed the backup failure several days after the problem and it takes time to re-install.

As QNAP QTS operating system is supporting LX and Docker container, I asked myself if if would have been possible to use container to do the backups. I was not alone to ask me the question: I discovered several container implementing CrashPlan.

All that was left to do was install a container myself.

Installing a crashplan container

The installation of a crashplan container is rather easy, when you know how to do it and what to pay attention to. The different steps are described below. I'm doing the following assumptions:

  • You know how to use docker on your QNAP NAS.
  • Your docker is already configured.
  • You know how to access your QNAP with SSH.
  • You have some basic knowledge of Linux.
  • You have a Docker ID.
  • You are using a Linux workstation.

Finding a CrashPlan container image

First of all, we need to find a container for our needs. After some research and try, I decided to use the " jrcs/crashplan:latest" image that can be found on Docker.

Installing a CrashPlan container

The CrashPlan container mus have access to the folder containing all your NAS data. By default, it is /share/CACHEDEV1_DATA: if you use the graphical interface, your container will not have access to all your data folders. Therefore it is important to use the command line interface.

Beside accessing your data, the CrashPlan container also needs to access and be reached through your IP network.

To install and start the CrashPlan container, log into you QNAP NAS via SSH, with the admin account. When you are logged in, type the following command:

> docker run -d --name crashplan --publish 4242:4242 --publish 4243:4243 --volume /share/CACHEDEV1_DATA/:/data jrcs/crashplan:latest

This will download the correct image, configure and run it.

Configuring CrashPlan

Now, your container is up and running, but not yet configured.

To remotely access the CrashPlan software running on you QNAP NAS, you still need to install the CrashPlan GUI. In fact, you cannot install only the GUI, but you have to install CrashPlan completely.

On the workstation you will be using to manage you backups (an Ubuntu workstation on my case, but you can do it on Windows or Mac OS as well), download the CrashPlan installation file and launch it with administrative rights (sudo on Linux and Mac). Leave all parameters to their default value. When the installation is finished, the installer propose to launch the GUI: accept it. You can check if your installation works correctly. However, the GUI is connected to your local workstation: not on your NAS. You need to do a modification on your workstation for that.

A file called .ui_info tells crashplan how to reach the server. You vill have to edit this file and add you server parameters in it. On Linux, this file is stored in /var/lib/crashplan.

As this file has a dot in front of it, it is hidden: if you type a single ls in that folder, you will see nothing. Type ls -a instead.

First, stop the CrashPlan GUI that was started at the end of the installation.

Edit this file with your favorite editor, but with admin right. I did it the following way:

> sudo vi .ui_info

You should see something like

> 4243,58a9f69a-2136-4eb6-a57f-2e10845a8b88,

The first number (4243) is the CrashPlan management port, then there is a key, and at the end the IP address of the server. You need to change the key and the IP address.

To find the key, you need to connect to the CrashPlan container running on your NAS in terminal mode. You can do tht through the graphical management interface of the Container Station. Once connected to the container, look for the .ui_info file located in /var/lib/crashplan. Copy the key to your local .ui_info file and add the IP of your NAS. When this is finished, save the .ui_info file and start the CrashPlan GUI.

If everything works fine, you should see the CrashPlan admin console the same way that just before the installation, but now connected to your NAS. You now just have to create a CrashPlan account (if not yet done), tell CrashPlan which folder to backup and it's finished.

If you have question, do not hesitate to ask then in this web site smiley