Running CrashPlan on a BeagleBone Black

CrashPlan is an excellent backup tool, allowing you to store backups on other computers (free) or in the cloud (paid for), and it's a Java application, so it will happily run on pretty much anything - with a bit of effort!

These are the steps I took to make it run on my Raspberry Pi (running Raspbian, but it should be similar on other distributions).  These commands are easiest when run as root, although most of them can be done using sudo.  [Based on http://www.bionoren.com/blog/2013/02/raspberry-pi-crashplan/, thanks!]

  1. Download Java 8 (ARMv7 Hard Float - make sure you're using Debian not Angstrom) from Oracle - this is a lot faster than openjdk!
  2. Extract the jdk-8-linux-arm-vfp-hflt.tar.gz file by running: tar -xzf jdk-*
  3. Move the extracted archive to a sensible location: mv jdk1.8.0 /opt/jdk1.8.0
  4. Add Java to the $PATH environment variable: echo "export PATH=\$PATH:/opt/jdk1.8.0/bin" >> ~/.bashrc (after this run ". ~/.bashrc" to apply the updated PATH)
  5. Download CrashPlan from Code42
  6. Extract the CrashPlan_*_Linux.tgz file by running: tar -xzf CrashPlan_*
  7. Navigate into the extracted directory: cd CrashPlan-install
  8. Modify the install.sh file so it allows Java 1.8: sed -i "s/OKJAVA=\".*\"/OKJAVA=\"1.5 1.6 1.7 1.8\"/g" install.sh​
  9. Run the install.sh!

Now we need to fix the issues, so CrashPlan will actually work...

Firstly jna:

  1. apt-get install libjna-java
  2. Add the path to jna.jar to /usr/local/crashplan/bin/CrashPlanEngine: sed -i "s/FULL_CP=\"\$TARGETDIR/FULL_CP=\"\/usr\/share\/java\/jna.jar:\$TARGETDIR/g" /usr/local/crashplan/bin/CrashPlanEngine

Now libjtux (based on http://crashbone.wordpress.com/):

  1. cd ~
  2. wget http://forum.excito.net/download/file.php?id=145 -O jtux.PS3-YDL6.1.patch.txt.gz
  3. gunzip jtux.PS3-YDL6.1.patch.txt.gz
  4. wget http://basepath.com/aup/jtux/jtux.tar.gz
  5. tar -xzf jtux.tar.gz
  6. cd jtux
  7. patch < ~/jtux.PS3-YDL6.1.patch.txt
  8. sed -i "s/JAVA_INCLUDE =.*/JAVA_INCLUDE=\/opt\/jdk1.8.0\/include/g" Makefile
  9. make
  10. chmod 644 libjtux.so
  11. mv libjtux.so /usr/local/crashplan/

And finally the MD5 library (based on http://crashbone.wordpress.com/):

  1. cd ~
  2. wget ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz
  3. tar -xzf libffi-3.1.tar.gz
  4. cd libffi-3.1
  5. CFLAGS="$CFLAGS -O3" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --disable-static
  6. make clean && make
  7. export FFI=`pwd`
  8. cd ~
  9. wget http://www.twmacinta.com/myjava/fast-md5-2.7.1.zip
  10. unzip fast-md5-2.7.1.zip
  11. cd fast-md5
  12. gcc -O3 -shared -fPIC -I. -I/opt/jdk1.8.0/include -I/opt/jdk1.8.0/include/linux src/lib/arch/linux_x86/MD5.c -o libmd5.so
  13. chmod 644 libmd5.so
  14. mv libmd5.so /usr/local/crashplan/

CrashPlan is now ready to use, and can be started with: service crashplan start

If you want it to start automatically, run: update-rc.d crashplan defaults

You can now connect to it using CrashPlan's headless client guide.


p.s. I found that by default I could not get two remote instances of CrashPlan to speak to each other when at least one was on a BeagleBone Black... I guess the UPnP feature doesn't work on our "customised" version, so I just needed to set up port forwarding on the routers - forward port 4242 to the BeagleBone Black and restart the crashplan service.