comment 0

Run CrashPlan in a Docker container on a QNAP TS-x53 Pro

QNAP TS-253 Pro

Until this week, I had been running CrashPlan on my QNAP TS-253 Pro as a standard QPKG. This deployment scenario is unfortunately not supported by Code42, and with the most recent update (4.5.0) it just plain stopped working, as it needs a newer version of some OS component than the one present on the QNAP.
After researching some scenarios and discussing with a friend who was in the same situation, we decided to try the Docker container support in QTS 4.2.0’s new Container Station.

Container Station

The idea is to have a very lightweight layer on top of Linux which will look and feel to the CrashPlan service as its own Linux installation. The trick is mounting the folders we want to backup and the configuration on the Docker container. With this solution, we no longer need to be concerned by future automatic upgrades. Hopefully the steps outlined here will help other people in the same boat.

To start off, and if you haven’t already, install the Container Station app from the QNAP App Center. Then go to an SSH shell on the NAS (using e.g. Putty, if you’re on Windows) and:

  • Pull a very lightweight CrashPlan container, e.g.: run docker pull jrcs/crashplan (repo at GitHub);
  • To set the container up, run the following command:
docker run -d --name crashplan -e TZ=[optional log timezone] --publish 4242-4243:4242-4243 --volume [path-to-config-on-host]:/var/crashplan --volume [path-to-data-on-host]:/storage jrcs/crashplan
  • [path-to-config-on-host] is some folder on the NAS where CrashPlan will place the configuration (don’t worry, if you have an existing machine, CrashPlan will automatically fetch the old configuration for you and place it here).
  • [path-to-data-on-host] is the root folder on the NAS from where CrashPlan can reach all the data you’ll want to back up.
  • [optional log timezone] is a value from the list of tz database time zones

Note: if you’re more confortable in Windows than in Linux, here are a few tips:
– type ls to list the current folder contents (similar to dir in the Windows Command Line);
– type cd to change directory (same as Windows);
– if you prefer a graphic explorer, give WinSCP a try.

For me, the command I ended up issuing looked like the following:

docker run -d --name crashplan -e TZ=Europe/Zurich --publish 4242-4243:4242-4243 --volume /share/CACHEDEV1_DATA/VM/ContainerStation/config/crashplan:/var/crashplan --volume /share/CACHEDEV1_DATA:/storage jrcs/crashplan

CrashPlan Desktop

Next, to point CrashPlan Desktop to your new installation, you need to run this command:

cat [path-to-config-on-host]/id/.ui_info

This will spit out [port],[access-token],[ip-address] required to get access to the service on the NAS. Since you’ll not be accessing this on the NAS itself, you’ll need to replace [ip-address] with the actual IP address of the NAS, and replace the content of %ProgramData%\CrashPlan\.ui_info with this line. And you’re done! You can now run CrashPlan Desktop and it will show you the status of backups on the NAS.

Lastly, you’ll want to set the CrashPlan container to auto-start when the NAS starts. For that, bring up Container Station, select your container under the Containers section and edit its settings. Toggle Auto Start to on. You can also set the upper limit of memory and CPU to be used by the CrashPlan container.

You’ll never look back to the CrashPlan QNAP package again :-).

Filed under: IT

About the Author

Posted by

Go Core Team Lead @ (remote), previously Windows Team Lead @ Plex (remote), Architect, Codebase Whisperer, DevOps enthusiast, Continuous Learner