Sunday, December 9, 2012

Crash Plan - Headless Ubuntu Server - Unity

CrashPlan is a "cloud" backup service, and one of the few that have linux clients. It is designed as a GUI client. I run a headless Ubuntu 12.04 server, and my desktop is also Ubuntu 12.04 with the Unity Desktop.

I am going to show you how to create a custom launcher that defaults to connecting to your Ubuntu Server from your Ubuntu Desktop Computer using ssh tunneling. I recommend that you use SSH keys. You can find a tutorial here: http://paulkeck.com/ssh/

First thing first. You need to download the client on your ubuntu server. I did it out of my home directory. I just did a wget, you could just download it with your browser and upload it to your server.
panaman@deathstar:~$ wget -d http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_3.4.1_Linux.tgz
Now you need to untar it and run the install (I just answered everything with defaults).
panaman@deathstar:~$ tar -zxvf CrashPlan_3.4.1_Linux.tgz; sudo CrashPlan_install/install.sh
After its done installing you will notice its running as a service.
panaman@deathstar:~/CrashPlan-install$ service crashplan status
CrashPlan Engine (pid 11960) is running.
Now you need to install it on your Ubuntu Desktop PC.
You can follow the exact same steps as above.

After you have the client installed on your Ubuntu Desktop you need to edit a config file for your client to listen on.
panaman@anakin:~$ sudo vi /usr/local/crashplan/conf/ui.properties
Make the File look just like the one below:
#Fri Dec 09 09:50:22 CST 2005
#serviceHost=localhost
servicePort=4200
#pollerPeriod=1000  # 1 second
#connectRetryDelay=10000  # 10 seconds
#connectRetryAttempts=3
#showWelcome=true

#font.small=
#font.default=
#font.title=
#font.message.header=
#font.message.body=
#font.tab=
Now you need to make a little shell script on your Ubuntu Desktop PC that will open your ssh tunnel and CrashPlan. You can call it what ever you want and put it where ever you want. I called mine deathstar_crashplan and placed it in my home directory. Mainly because my Ubuntu Server's name is "Deathstar".
panaman@anakin:~$ vi /home/panaman/deathstar_crashplan
Paste the following in your script and replace "deathstar" with the name or IP address of your Ubuntu server.
#!/bin/bash
gnome-terminal --disable-factory --sm-client-disable -x ssh -L 4200:localhost:4243 panaman@deathstar &
/usr/local/crashplan/bin/CrashPlanDesktop;
exit
Make your script executable.
panaman@anakin:~$ chmod 700 ~/deathstar_crashplan
Now you need to edit your CrashPlan Icon. Just right click it and click properties.
You are going to need to change the Command path to point to the shell script you created.
I also Changed the Name of mine to "CrashPlan Deathstar"

Now you are complete, you should be able to launch your Crashplan GUI thats connected to your Ubuntu Server and start adding folders on your server to backup.

2 comments:

  1. thanks for the post, i used some part of this to install crashplan on my NAS (ubuntu server).

    It seems u have a typo in the second command

    wrong:
    sudo CrashPlan_install/install.sh

    correct:
    sudo CrashPlan-install/install.sh

    atleast with Crashplan version 3.5.2 :)

    ReplyDelete
  2. Good Post. CrashPlan has a detailed pictorial explaining the same here: http://support.crashplan.com/doku.php/how_to/configure_a_headless_client

    ReplyDelete