Welcome! Log In Create A New Profile

Advanced

Crashplan Setup On arm5/Debian Wheezy/GoFlex Net

Posted by DonCharisma 
Crashplan Setup On arm5/Debian Wheezy/GoFlex Net
October 19, 2014 07:57AM
Again this is self-documentation rather than a precise how-to, if in doubt do your own research and due dilegence in advance ... I had to already :D

Crashplan is a cloud backup service. It's not perfect, but it works OK. Crashplan comes in a linux package, however they are generally expecting an Intel/AMD processor. It does, I can confirm however, work on arm platform, just a few extra steps to install, but I guess if you've been working on embedded computers any length of time you'll be used to that !

Before we start

Crashplan min hardare specs say 1GB ram/ 1 GHZ CPU. GoFlex Net meets the later I think. Memory wise I've monitored it's usage on my Win7 machines and : 1. The desktop client uses a lot of memory, nearly 512Mb. The server uses anywhere between 100Mb - 1GB.

Solution - SWAP space. I have 8GB spread over two disks. I've read the guides on swap sizing, and yeah, bullshit, set it whatever you want, twice your memory was somebody guessing. I'd guess around 2GB swap minimum, so make that happen before you start. Also if you have two disks, two swap partitions and set them to the same priority the kernel will automatically RAID0 your swap, so you should get a performance gain, ie twice as fast.

Crashplan is based on Java. I'm personally not much of a fan of Java, because it seems bloated generally. This fact runs to our advantage with Crashplan, because most of the memory it thinks it needs it rarely actually uses. On my setup it's something like 1.2GB of virtually memory and 20Mb actually used by Crashplan. MY CPU is running flat out, so there's not a lack of memory issue, it's a CPU bottleneck. Bottom line, it'll run OK on 128Mb RAM/ 1.2GHZ CPU.

Crashplan uses a Java library called "jtux". Jtux is a unix commands library for java. In laymans terms it means Java can run things like "ls" and "cd" commands. Jtux you wont have already, and you will have to compile it. It's recommended you do this prior to installing Crashplan, otherwise Crashplan will try to work with i586 code and that won't work on your arm machine.

Crashplan is a two part application. A server and a client. On arm device which doesn't have a desktop GUI or monitor attached, you'll be running "headless". Which means there's some jiggery-pokery needed to get the client program to access your server. No problem, this can be done.

I found many useful snippets and guides, I'll try and share the links. Crashplan do also have very useful and helpful pages on their site, so try there too. These are the main ones :

http://www.4thinker.com/crashplan.html
http://geekfun.com/2011/08/29/crashplan-install-script-for-arm-debian-on-pogoplugs-and-dockstars/
http://www.4thinker.com/crashplan.html

Crashplan on GoFlex Net

Mainly the install is based around this script from geekfun.com - http://geekfun.com/wp-content/uploads/2011/08/crashplan.sh_.txt

There where a couple of errors, and changes so better to run manually. I've attached the script, the patch and the jtux file in case they go missing (thanks and acknoledgement to geekfun.com)

apt-get install default-jdk build-essential cpio libjna-java
cd /home
mkdir jtux
cd jtux
wget http://geekfun.com/wp-content/uploads/2011/08/jtux.tar
tar -xf jtux.tar.gz
cd jtux
wget http://geekfun.com/wp-content/uploads/2011/08/jtux.PS3-YDL6.1.patch_.txt -O jtux.PS3-YDL6.1.patch
patch <jtux.PS3-YDL6.1.patch
patch <<-"PATCHDATA"
	--- Makefile	2011-08-23 23:20:28.837431247 -0700
	+++ Makefile	2011-08-23 23:21:12.637429481 -0700
	@@ -1,4 +1,4 @@
	-JAVA_INCLUDE = /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/include
	+JAVA_INCLUDE = /usr/lib/jvm/default-java/include/
	 INCLUDE = -I. -Iinclude -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/linux
	 CFLAGS  = -Wall -D_REENTRANT -D_THREAD_SAFE -std=c99
	 OBJECTS = jtux_clock.o jtux_dir.o jtux_file.o jtux_network.o \
PATCHDATA

make

cd /home
mkdir crashplan
cd crashplan
# wget http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_3.0.3_Linux.tgz
# you can't wget it I think, you'll need to download via your browser and put the file in your /home/crashplan folder 
tar -zxf CrashPlan_3.6.3_Linux.tgz.tgz
cd  CrashPlan-install
./install.sh
# Follow through the screens, fill in what's asked, it's simple stuff

cp /home/jtux/jtux/libjtux.so /usr/local/crashplan/

# /etc/init.d/crashplan restart ... (old-school I think ?)

service crashplan restart

# and for later
# to stop crashplan
service crashplan stop

# to start crashplan
service crashplan start

That's it for the basic installation. Crashplan now lives in /usr/local/crashplan/ ... and should start automagically on boot.

You can monitor what it's doing in the /usr/local/crashplan/log folder ... to monitor in real time use this

tail -f tail -f /usr/local/crashplan/log/service.log.0

Either that or the error log will tell you if there's an issue and what it is :D

You could if you're really a keyboard jockey configure all your backups via the xml config files and there's probably a way of monitoring Crashplan without the GUI client. However for us mere mortals you probably need to get the GUI up and running on another machine.

I'm assuming you're running Crashplan Home, if you're Pro or ProE then you'll need to figure the missing parts in all of this yourself (I don't have access to either service).

What we need to do is to make an ssh tunnel between the machine with the GUI client and your arm machine running the server. If you're using Putty for ssh client, or your GUI is going to be on a Linux desktop then it's all in this guide on the Crashplan website - http://support.code42.com/CrashPlan/Latest/Configuring/Configuring_A_Headless_Client

I use Bitvise Tunneler on my PC, so it was slightly different, I need to setup a "C2S" tunnel in Bitvise. My settings are :

Status   Listen Interface   List. Port   Destination Host   Dest. Port 
enabled   127.0.0.1   4200   localhost   4243

Basically locally to your CLIENT you need to modify your ui.properties file to say that your SERVER is listening on 4243 rather than 4200. Then redirect the 4243 port on your CLIENT to port 4200 on your SERVER, ie your arm box. One way or another this is done via a ssh tunnel.

Once you've done the above you'll be able to connect via the Crashplan GUI client on your desktop/laptop.

I seem to remember there being a permissions issue with my client connecting to the server. I'm sorry I forgot the solution, if I remember I'll re-edit this :D Google it when you get it :D

Job Done

Well almost :D

Crashplan does run slowly at the best of time, so don't expect super high speed uploads off of your GoFlex Net or Pogo. In reality the data will trickle onto Crashplan's servers through you leaving your box running 24/7. Understanding what the Crashplan server is doing, and has to do might help ease the frustration. AND I don't get particularly high upload speeds even on an 8 core 8GB up-to-date Win7 machine. Crashplan do throttle bandwidth, it's just something you have to accept.

Also to note is that Crashplan (UI -> Settings -> General) limits CPU to 20% by default whilst you're watching it. So might be worth finding some other means of monitoring it's speed !

Crashplan compresses and encrypts everything they send. Compression saves on bandwidth and means potentially slightly faster uploads. Encryption means data is secure(ish) and can't be read by any tom, dick or harry with a network sniffer. They also do data-depuplication, which is a resource intensive process in and of itself. It does mean you shouldn't need to send the same files twice if you have them in different directories. It also should mean that your backed up data has more integrity.

What I'm experimenting with, is the hardware cryptodev engine in the GoFlex Net via openssl. So far I've managed to get it up and running, but doesn't seem to have made a great deal of difference to the performance of Crashplan. Anyway, since Crashplan is doing a lot of encryption, it's a performance avenue you might like to investigate. I'm intending to do a post about it, so look out for it.

Lastly I migrated my /usr/local/crashplan/cache onto my RAID10,f2 partition. Rationale is these files are constantly accessed and might get a slight performance improvement by putting them there.

Complaints to /dev/null please :D

Comments, questions and suggestion are welcomed, provided you can string a relevant and polite sentence together ... other, again /dev/null ...

Cheers

DC

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com



Edited 4 time(s). Last edit at 10/19/2014 01:25PM by DonCharisma.
Attachments:
open | download - crashplan.sh_.txt (3.5 KB)
open | download - jtux.tar (310 KB)
open | download - jtux.PS3-YDL6.1.patch_.txt (3.8 KB)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: