I’m migrating from FreeNAS to Proxmox 4.3. On FreeNAS, there was a built-in plugin for CrashPlan support, which I was using to back up the files that FreeNAS was serving from ZFS over the network. However, keeping this plugin running was a chore, with forced automatic CrashPlan updates frequently breaking it and requiring manual intervention to fix, and headless operation requiring an unsupported, tedious procedure to achieve, with lots of opportunities for getting it wrong.
On top of this, CrashPlan doesn’t actually support FreeBSD, and instead relies on the Linux emulation that the FreeNAS jail system provides, which puts the plugin at risk of being broken by CrashPlan relying on unsupported Linux kernel features.
By contrast, Proxmox provides the perfect environment for CrashPlan. Having a real Linux kernel available for the LVM container system to use means there’s no kernel incompatibility to worry about.
In this tutorial, I’ll show you how I installed CrashPlan into an Ubuntu 16.04 container on one of my ZFS volumes, and added bind mounts to allow CrashPlan to access my files for backup. I’ll access the CrashPlan interface from my MacBook by using X11 forwarding, so that I don’t need to do any of the “.ui_info” updating nonsense that the FreeNAS plugin required.
Download the template
First, we’ll download the Ubuntu 16.04 template. In the Proxmox UI, click on the local storage for the node you’ll be installing the container into. On the “Content” page, hit the Templates button. Select the Ubuntu 16.04 template and hit Download.
Create the container
From the Proxmox UI, hit the Create CT button at the top right.
Note: If you’re using a ZFS dataset for the container’s root drive, the dataset must be mounted on Proxmox in the “standard” location (the root directory /). i.e. if your dataset is called “primary-data/lxc” then it must be mounted at “/primary-data/lxc” on Proxmox (not /mnt/primary-data/lxc as I had it set originally).
On the “options” page, I turned on “start at boot” so CrashPlan will start with Proxmox.
Attach your backup datasets
I’ll have CrashPlan back up the contents of two of my ZFS datasets into a “CrashPlan backup” dataset on a different volume. I’ll also attach a dataset to store incoming backups from other computers/VMs on my network.
We can’t use the “Add mount point” button on the “Resources” page in the GUI to attach datasets, since it doesn’t let us create bind mounts to allow CrashPlan to access existing ZFS datasets. Instead we’ll SSH into Proxmox and edit “/etc/pve/lxc/YOUR-VM-ID-HERE.conf” using nano or vim.
I add a series of mount points to the bottom of the file:
# Take the ZFS dataset mounted at /primary-data/data # on Proxmox, and mount it to /mnt/data inside the # CrashPlan container. # # I chose this mount point to be in the same location as # it used to be was when I was using FreeNAS for easy # adoption of the old CrashPlan backup archive: mp0: /primary-data/data,mp=/mnt/data mp1: /primary-data/photos,mp=/mnt/photos # Now my two mount points for Crashplan's backup archives and # inbound backups from other machines mp2: /crashplan/backup,mp=/mnt/backup mp3: /crashplan/inbound,mp=/mnt/inbound
Start up your container, SSH into it using the container’s IP and the root account, and verify that your mount points attached successfully (any typos will result in the mounts going missing).
I found I had to restart the container once before it would let me connect using SSH. You could also SSH into Proxmox, run
pct enter YOUR-VM-ID-HERE to get a shell into the container, then run
service restart ssh to kick it back into life for you.
Go to the CrashPlan website and grab the latest download link for the Linux version.
On your container, bring the system up to date, install the GTK2 prerequisite, then install CrashPlan using the link you grabbed:
apt-get update apt-get dist-upgrade -y apt-get install libgtk2.0-bin -y # While we're here, remove mlocate, because if we have a lot of files it really sucks up resources apt-get remove mlocate -y # For CrashPlan Pro, we also need these packages: apt-get install libxss1 libnss3-dev libasound2 -y wget https://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_4.8.0_Linux.tgz tar -xf CrashPlan_4.8.0_Linux.tgz cd crashplan-install ./install.sh
The only question I need to answer is the location for incoming backups (received from other computers) since I mounted that device at /mnt/inbound, the rest can be left at their defaults:
Welcome to the Code42 CrashPlan installer. Press enter to continue with installation. Validating environment... detected root permissions What parent directory do you wish to install CrashPlan into? [/usr/local] What directory do you wish to link the CrashPlan executable to? [/usr/local/bin] What directory do you wish to store incoming backup data? [/usr/local/var/crashplan] /mnt/inbound What directory contains your SYSV init scripts? [/etc/init.d] What directory contains your runlevel init links? [/etc/rc5.d] Your selections: CrashPlan will install to: /usr/local/crashplan And put links to binaries in: /usr/local/bin And store data in: /mnt/inbound Your init.d dir is: /etc/init.d Your current runlevel directory is: /etc/rc5.d Is this correct? (y/n) [y]
CrashPlan will download and install a JVM for us, then installation will be complete:
CrashPlan has been installed and the Service has been started automatically. Important directories: Installation: /usr/local/crashplan Logs: /usr/local/crashplan/log Default archive location: /mnt/inbound Readme: /usr/local/crashplan/doc Start Scripts: sudo /usr/local/crashplan/bin/CrashPlanEngine start|stop /usr/local/crashplan/bin/CrashPlanDesktop To start the Desktop UI: /usr/local/bin/CrashPlanDesktop
Run the CrashPlan GUI
Now we just need to launch the desktop UI. We’ll run the CrashPlan desktop app inside the container, and have it connect to an X server running on our local machine to display its UI.
This requires SSH with X11 forwarding support and an X server on the machine that’ll display the UI.
- On macOS, install XQuartz to provide a local X server, and we’ll use macOS’s built-in SSH
- On Linux, you should already have an X server and SSH installed
- On Windows, you can use Xming and puTTY
Now on Linux and macOS, to start up the CrashPlan UI we enable X-forwarding with “-Y” when we SSH to CrashPlan:
ssh -Y root@YOUR-CRASHPLAN-IP
Then run the GUI:
I logged in to my existing account and adopted the backup that CrashPlan on my FreeNAS used to manage. On the Backup tab, I checked that CrashPlan was finding the files to be backed up correctly from ZFS. At the bottom of the Backup tab, I checked that the Inbound backups were using the correct paths (if the Inbound path has changed, the Inbound backups need to be individually adjusted to match). Finally, on the Destinations tab, I made sure that my main “Folder” destination was set to “/mnt/backup” (this is where I have CrashPlan put its main backup archive).
That’s it! Once we’re satisfied that we’ve got it running, we can exit the GUI. The CrashPlan backup service will continue backing up in the background for us.
I’m hopeful that Crashplan will be able to keep itself up to date automatically without any hiccups. But if it doesn’t, it’ll be a simple matter to re-run the installer and adopt the old backup.