Online backups with CrashPlan

When I came across Evaluating Online Backup Services the other day, I remembered that I looked into that topic too a year ago or so. And I was surprised to see that the finalists were the same one as well. In alphabetical order:

  • Arq - unlimited storage, per-user encryption, their backup client costs $29, but then they're offering the restore client for free. Also, data integrity seems to be one of their key benefits
  • Backblaze - unlimited storage at an incredibly low price, per-user encryption but unfortunately no Linux client.
  • CrashPlan - unlimited storage at an incredibly low price, per-user encryption and a Java client, which is good enough.
  • Jungle Disk - unlimited storage, per-user encryption, Linux client, not sure about their security approach though.
  • SpiderOak - per-user encryption, Linux client, Android client coming soon, but unfortunately no unlimited storage plans.
With unlimited storage and an able backup software and because I already had a trial account from last year, I went with CrashPlan. Since I did not want to backup from my workstation, I went for the headless client installation, but with a few modifications.

On this Ubuntu 10.04 system (ia32), the Java JRE was already installed:
$ dpkg -l | grep java
ii  java-common      0.34                     Base of all Java packages
ii  sun-java6-bin    6.24-1build0.10.04.1     Sun Java(TM) Runtime Environment (JRE) 6
ii  sun-java6-jre    6.24-1build0.10.04.1     Sun Java(TM) Runtime Environment (JRE) 6
Also, we wanted to run CrashPlan as a different user:
# useradd -d /opt/crashplan -m -s /bin/false crashplan
# id crashplan 
uid=1002(crashplan) gid=1002(crashplan) groups=1002(crashplan)

# su -s /bin/bash - crashplan 

$ tar -xzf /tmp/CrashPlan_3.0.3_Linux.tgz 
$ cd CrashPlan-install/
$ ./install.sh 
[....]
Would you like to start CrashPlanDesktop? (y/n) [y] n
Now that CrashPlan is installed (notice that we did not start the GUI), we'll fix a few permissions and file ownerships:
cd /opt/crashplan
rm -rf .bash_history CrashPlan-install
chown -R root:root .
chmod 0750 .

mkdir tmp
chown :crashplan . 
chown -R crashplan:crashplan .crashplan
chown -R :crashplan log/ conf/  lang/ tmp/ cache/ manifest/
chmod -R g+rw       log/ conf/  lang/ tmp/ cache/ manifest/
Almost done. A few quirks are still left:
sed 's/TARGETDIR\/\${NAME}\.pid/TARGETDIR\/log\/\${NAME}\.pid/' \
               -i.bak bin/CrashPlanEngine 
sed 's/SRV_JAVA_OPTS=\"/&-Djava.io.tmpdir=\/opt\/crashplan\/tmp /' \
               -i.bak bin/run.conf
sed 's/FINE/WARNING/;s/INFO/WARNING/' \
               -i.bak conf/service.log.properties
The first command makes sure the PID file gets written into log/, which is writable for our CrashPlan user. The second one fixes a java exception we got, because /tmp is mounted with noexec here. Finally, we reduce the loglevel, so our logfiles are not getting spammed with debug information. You might want to postpone this change until things are up & running. With all that in place, we can start the CrashPlan engine:
# su -s /bin/sh -c "/opt/crashplan/bin/CrashPlanEngine start" crashplan
The engine will listen on 127.0.0.1:4243 - that's where our desktop client has to connect to. We'll use the desktop client only to configure and schedule the backups. The actual backup jobs will be run by the engine on the server and we can just close the desktop client at any time. Enjoy! But make sure your restores are working too! :-)

Update: Bonus points for extra leetness: CrashPlan offers to ship your initial backup to them. Incredibly useful for bigger backups!