Skip to content

Instantly share code, notes, and snippets.

@johngrasty
Last active September 3, 2015 14:53
Show Gist options
  • Save johngrasty/46d311b48a7181d98661 to your computer and use it in GitHub Desktop.
Save johngrasty/46d311b48a7181d98661 to your computer and use it in GitHub Desktop.
Running Crashplan in an LX zone headless with UI on Mac OS X

History

Originally I installed Crashplan 3.7 in an LX zone. The data to be backed up was from my home NAS (a fileserver zone with netatalk and samba running) that was lofs mounted into the crashplan zone. Eventually I moved the data for the NAS into the globalzone and mounted it into both the "fileserver" zone and crashplan zone using lofs. This eliminated problems with boot order of the zones. I recently updated Crashplan from 3.7 to 4.3. I followed the Linux instructions on the Crashplan website---seemingly without issue.

Environment

  • platform: joyent_20150813T164025Z
  • lx image UUID: c8d68a9e-4682-11e5-9450-4f4fadd0936d (Ubuntu 14.04)
  • lofs mount into lx zone using of data to be backup (using the ro option just in case something goes haywire with Crashplan):
  "filesystems":[
    {
      "type": "lofs",
      "source": "/zones/fileserver",
      "target": "/data",
      "options": ["ro"]
    }
  ]

Installation

  1. Follow steps from here. URL for current (2015-08-27) Crashplan app is: https://download2.code42.com/installs/linux/install/CrashPlan/CrashPlan_4.3.0_Linux.tgz.
  2. That's it!

Configuring UI

Okay. So there are a few (at least two) routes to go here. This is what Crashplan recommends/suggests. I didn't do this, because these directions weren't available when I did my original setup. It is more secure, because it is using SSH tunnels. But my UI interface is only listening on my private LAN where there simply isn't a concern in my case.

Here's what I did:

  1. Follow step 1 from the Crashplan link to move the ui_token from the remote computer (headless server to be backed up) to the local computer (where you will be running the UI). (I think I copied the .identity file too, but I'm not backing up my local machine using crashplan, and I don't know the fallout of this.)
  2. Edit the ui.properties file to point to the remote server. serviceHost=<remote server ip (I don't know if it will do DNS lookups)> On OS X, the file is located here: "/Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties"
  3. Edit the my.service.xml file on the remote server. I installed to /opt/crashplan, so my path was /opt/crashplan/conf/my.service.xml. You need it to listen not just on localhost for the UI. So my change was:
<serviceUIConfig>
    <serviceHost>0.0.0.0</serviceHost>
  1. I restarted the service, and logged in on my Mac. And everything worked normally.

Caveats

  1. Crashplan is managed by upstart so there is no smf goodness. This is sad. I had one or two crashes of Crashplan in the last 9 months or so. I make sure that the alerts are on in Crashplan, so that there service will email me if it hasn't heard from the lx zone each day. I would highly recommend this.
  2. inotify's fs.inotify.max_user_watches seems to be capped at 8192. For this reason, I make sure that Crashplan is set to verify that everything is backed up, since it can watch all the files.
  3. I have not taken the time to figure out how to disable the com.crashplan.engine service on my Mac using launchctl. I will get around to it...eventually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment