SOLVED Tested CrashPlan 4.5 setup

Status
Not open for further replies.

Martin Aspeli

Dabbler
Joined
Jan 13, 2016
Messages
29
There are a lot of threads about CrashPlan, and it's kind of a pain to set up, but once you have it, it's very good. I recently got it to work, and here are my notes.

First, some background:
  • CrashPlan is a backup service, which offers unlimited cloud storage as well as peer-to-peer models. In this scenario, I wanted to send the photos and documents stored on my FreeNAS to the CrashPlan cloud storage and keep them backed up.
  • CrashPlan does not support "headless" installation. However, it's a Java app and it uses a client/server architecture even when installed locally, so you can trick it into running the client (which you use to set up what gets backed up, manage your account, etc) on your local machine (a Mac in my case), and the server somewhere else (the FreeNAS in my case).
  • FreeNAS 9.x ships with a CrashPlan plugin. It works, but it's a really old version, and you'll get into trouble because you're likely to have a newer local client version for the UI and the two will get confused.
  • CrashPlan will automatically update itself, but this is something of a black art and may not work if client and server are too far out of sync.
Steps:
  • Install CrashPlan locally, but do not start it yet. If the installer starts it, shut it down. I'm using the Mac version, 4.5.2. This should work on Windows and Linux too, but some of the file paths for the local machine will be different.
  • Install the CrashPlan plugin via the FreeNAS admin GUI. This will create a new plugin jail called crashplan_1 (at least if this is the first time you're doing it)
  • After installation, find it in the tree on the left, click on it, and accept the Java license terms.
  • Make sure the plugin is started in the FreeNAS admin GUI plugin settings.
  • Use the Jails -> Storage tab to mount some storage in the crashplan_1 jail. This needs to encompass everything you want to eventually back up. You probably want to mount it as read-only.
  • Log into the FreeNAS terminal (ssh or the web console) as root (or a sudo-capable user). We now need to do a number of things in the Jail:
First, install bash:

Code:
$ jexec crashplan_1 /bin/tcsh


Then symlink the bash binary to /bin/bash (this is used by a CrashPlan upgrade script):

Code:
$ ln -s /usr/bin/bash /bin/bash


We then need to enable SSH in the jail, and create a user that can be used to SSH in. This is to enable us to do port forwarding later:

Code:
$ sysrc sshd_enable=YES
$ service sshd start
$ adduser crashplan


Set up some sensible values for the crashplan user. You need to know the password so you can use it when you SSH in (unless you want to set up key based access).

We're now going to upgrade CrashPlan in-place from the version installed by the FreeNAS plugin, to the same version as the client version (4.5.2). These steps worked for me, but clearly may not work forever with different versions of CrashPlan, so take precaution. If it all goes wrong, you can always blow away the plugin jail and try again.

Code:
        $ cd /usr/pbi/crashplan-amd64/share/crashplan
        $ wget --no-check-certificate http://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_4.5.2_Linux.tgz

        $ tar -xf CrashPlan_4.5.2_Linux.tgz

        $ cd crashplan-install

        $ cpio -idv < CrashPlan_4.5.0.cpi
        $ service crashplan stop
        $  cd ..
        $ rm -r lib*
        $ cp -r crashplan-install/lib* .
        $ service crashplan start


At this point, there should be a file in "/var/lib/crashplan/.ui_info" inside the crashplan_1 jail. You will need values from this, so print it to the console and copy it somewhere safe:

Here's how mine looks (almost...):

Code:
$ cat /var/lib/crashplan/.ui_info
4243,9a413ec1-1250-43c4-85cb-2fee5ab0cd12,127.0.0.1


There are three bits of information here, separated by commas: a port (4243), a GUID string (the long middle one), and the IP address where CrashPlan is running.
  • We now need to go back to the Mac and trick the client app into using the server on the FreeNAS. We're going to do this by (a) using SSH port forwarding so that port 4243 (the CrahsPlan port) in the crashplan_1 jail will be forwarded to port 4200 on the local machine; and (b) change the file the CrashPlan GUI uses to look up the port and GUID of the CrashPlan server.
  • You'll need to edit the file "/Library/Application Support/CrashPlan/.ui_info" on the Mac so that it uses port 4200 and the GUID string. Here's an example:
Code:
$ cat /Library/Application\ Support/CrashPlan/.ui_info
4200,9a413ec1-1250-43c4-85cb-2fee5ab0cd12,127.0.0.1


Note that this file is a bit prone to getting over-written by the CrashPlan GUI, so keep a copy of it in case you need to re-create it.

  • You also need to edit "/Library/Application Support/CrashPlan/ui_<username>.properties", where <username> is your Mac username, to add or modify a "port=4200" line:
Code:
# other stuff, then add:
port=4200


  • Now start the SSH tunnel from the Mac:
Code:
ssh -L 4200:localhost:4243 crashplan@crashplan_1 -Nv


In this example, the crashplan_1 jail is running on a local network where it has the hostname crashplan_1. If that's not the case, substitute the correct hostname or IP address. We're starting SSH in non-interactive mode here, so you'll see some logging messages, but not console.

  • Finally (!) start up the CrashPlan GUI on the Mac. It should now connect to localhost port 4200, which will forward to crashplan_1 port 4243, and let you log in and start to manage your backup. The key thing here is that when you are choosing files to back up, you're actually browsing directories in the FreeNAS crashplanj_1 jail, not your local machine. If you mounted the relevant storage, you should be able to choose whatever you want to back up.
  • Once you're done, you can shut down the CrashPlan GUI and terminate the SSH tunnel (Ctrl+C).
  • If you need to access the GUI again, you need to start the SSH tunnel once more before opening it. If you're getting errors (or asked to set up an account again), it's probably because either the SSH tunnel isn't running, or the .ui_info file has gotten reset on the Mac, in which case you need to edit it again to have the right port and access key before starting the GUI.
Good luck. It's a bit of a pain, but it's very solid once set up. I backed up 320Gb of photos in ca four days, and it went very smoothly. I'm also using the CrashPlan mobile app to both monitor the age of my backups and to access files remotely.

Martin
 

inpowers

Dabbler
Joined
Jan 29, 2016
Messages
37
Hi Martin
When you did the update of Crashplan from 3.6 to 4.5.2 does it show the update version in the installed plugins on Freenas?

Thanks mate
 

Martin Aspeli

Dabbler
Joined
Jan 13, 2016
Messages
29
I don't think so, but it shouldn't matter. The CrashPlan UI will tell you what version the server is running.
 

DocFarren

Cadet
Joined
Feb 25, 2016
Messages
1
Thank you! With your post I was able to update my crashplan jail. It seems to work even, because other computers can back up to it again.

But I could not get the front end on my linux machine to connect to the backend in the jail, is there anything else I need to check or set? In the jail, the ui_info is as follows:

cat /var/lib/crashplan/.ui_info
4243,7fe252e8-1521-48cb-a6e9-532887caa0e2,0.0.0.0

Just like in your example. On my local machine, it looks like this:

cat /usr/local/crashplan/conf/ui.properties
#Fri Dec 09 09:50:22 CST 2005
#serviceHost=192.168.0.10
#servicePort=4200
port=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=

I commented serviceHost and servicePort, because they no longer seemed to work with 4.5.2, even though they worked perfectly fine in 3.6.3. Lastly, on my local machine:

cat /var/lib/crashplan/.ui_info
4200,7fe252e8-1521-48cb-a6e9-532887caa0e2,192.168.0.10

I entered the ip of the jail last, but it worked neither with 0.0.0.0 nor the actual ip. I then opened an SSH tunnel just as you described, but the frontend still can't connect to the backend. Have I missed something or can I try something else?

Thank you!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
We then need to enable SSH in the jail, and create a user that can be used to SSH in. This is to enable us to do port forwarding later:
Thanks for the work writing this up--as you say, it can take some fiddling to get CrashPlan working properly in a headless mode. But part of the problem is that the "official" CrashPlan docs contain the completely unnecessary additional complication of setting up an SSH tunnel to the server. There's simply no reason to do this--you can just connect the client to the server directly.

Or you can set up an Ubuntu VM (in a VirtualBox jail on FreeNAS, or elsewhere), export the directories you want to back up via NFS, mount them to the VM, and install CrashPlan there. Since you can VNC to that VM, you don't need to mess with the headless configuration.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Thanks for this!

Had been thinking about Crashplan for sometime as I'm struggling to find time to move my backup FreeNAS box more than a few inches from the main one, which isn't a problem for a major disk or hardware failure, but not great if the house burns down or someone breaks in and takes them both!

Got this up and running with very few issues (a few user errors with ports and not having the crash plan service running) in not much time and it's now busily backing up in the background.

I wonder how long 2.5TB will take, and will it complete within my free trial :D
 

Martin Aspeli

Dabbler
Joined
Jan 13, 2016
Messages
29
Thank you! With your post I was able to update my crashplan jail. It seems to work even, because other computers can back up to it again.

But I could not get the front end on my linux machine to connect to the backend in the jail, is there anything else I need to check or set? In the jail, the ui_info is as follows:

cat /var/lib/crashplan/.ui_info
4243,7fe252e8-1521-48cb-a6e9-532887caa0e2,0.0.0.0

Just like in your example. On my local machine, it looks like this:

cat /usr/local/crashplan/conf/ui.properties
#Fri Dec 09 09:50:22 CST 2005
#serviceHost=192.168.0.10
#servicePort=4200
port=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=

I commented serviceHost and servicePort, because they no longer seemed to work with 4.5.2, even though they worked perfectly fine in 3.6.3. Lastly, on my local machine:

cat /var/lib/crashplan/.ui_info
4200,7fe252e8-1521-48cb-a6e9-532887caa0e2,192.168.0.10

I entered the ip of the jail last, but it worked neither with 0.0.0.0 nor the actual ip. I then opened an SSH tunnel just as you described, but the frontend still can't connect to the backend. Have I missed something or can I try something else?

Thank you!

You need to run the ssh command to open the tunnel. You then need the crashplan GUI client app to connect to localhost, port 4200 (which is the local port that forwards to the crashplan port in the jail).

The instructions should work. I don't know what the paths are on Linux but other than that it should all be the same.

Martin
 
Joined
Mar 8, 2016
Messages
1
Thank you for this excellent post. After struggling all day yesterday, finding this post got me sorted quickly.

Can you explain why you choose to use an ssh tunnel to connect instead of configuring the CrashPlan server to listen on all interfaces? My assumption is that the communication between the CrashPlan client and server is not encrypted, and using the ssh tunnel protects the conversation while it traverses the network. On my home network, I don't care about that too much, and configuring the server to listen on all interfaces simplifies connecting to it tremendously.

Other people have described how to configure the server to listen on all interfaces (IIRC change my.service.xml from 127.0.0.1 to 0.0.0.0), so I won't repeat it here, but I recommend it as a simplifying change to the instructions above, so long as you're in a secured network.
 

inpowers

Dabbler
Joined
Jan 29, 2016
Messages
37
Hi Martin
This maybe a stupid question but if I want to add a second PC to be backed up using crashplan do I have to do the same process again as per your instruction OR just install Crashplan on the second PC open the tunnel using putty and set up the port and serial in the .ui_info?
Will it backup using the PC name or does it just add it to the what already has been backed up?

Thanks
inpowers
 

Todd Hayward

Dabbler
Joined
Jan 10, 2014
Messages
22
These instructions are perfect (even though they do assume that you have the 3.6.3_1 plugin installed, and authorized, and in a running state). So, be sure to do that first.

There are three things to bare in mind when using windows as the remote gui:
1. make sure that the windows firewall is not getting in your way of connecting to localhost:4200 for your SSH tunnel
2. you MUST make the edits to the .ui_info and ui_username.properties files. Also, make them read-only, since the local crashplan backup service will try to over write them.
3. any time you change your crashplan config files, you must restart the crashplan service (on windows).

For the server history in the remote GUI to work, do this:

cd
service crashplan stop
/usr/pbi/crashplan-amd64/share/crashplan/conf
cp -f ../crashplan-install/conf/* .
service crashplan start

Recap:
1. Get the plugin installed and running (verify with: #> jexec crashplan_1 sockstat -4 | grep 42*) (expect some output)
2. follow the instructions above
3. get the history working as instructed above
4. heed my caution in this post for using windows for the remote GUI

It should all work fine.
 
Last edited:

Todd Hayward

Dabbler
Joined
Jan 10, 2014
Messages
22
Hi Martin
This maybe a stupid question but if I want to add a second PC to be backed up using crashplan do I have to do the same process again as per your instruction OR just install Crashplan on the second PC open the tunnel using putty and set up the port and serial in the .ui_info?
Will it backup using the PC name or does it just add it to the what already has been backed up?

Thanks
inpowers

No none of this is required for additional PCs, only for the local headless crashplan server. For other computers, just install the crashplan client on the new PC, and login with a new account, or use the existing logon you used for the crashplan server. Its pretty easy to figure out after that. Invite other computers (using a unique code), and then you will see the server as a backup destination. Configure your backup to use that destination, and you are off and running.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
These are fairly comprehensive instructions but the worry is, as usual. When CP release 4.5.3 or 4.6, is that going to auto update and even if it doesn't, how difficult will it be to update it to 4.6?
My 4.3 is basically useless and not repairable at this point due to the way that company handle themselves.
 

Keith Savoie

Dabbler
Joined
Apr 23, 2014
Messages
35
Hey Martin,
Would you be able to update this post to reflect the changes needed for 4.6? Just tried to update to 4.6 and it looks like desktop client directory structure and file names/usages have changed.
Thanks for your work on this thus far!
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
At this point I think it's time to ask, what alternatives do we have from Crashplan? This has reached utterly ridiculously point when it comes ot them breaking the application.
Ideally encrypted, reasonable pricing.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I've not had any of the previous experience with this, as the first time I've used Crashplan is by following this guide.

It was pretty straight forward to set-up and has been happily chugging away in the background since I did. Almost at the end of my free trial and >86% of 2.7TB has been uploaded, so I've taken out a 12 month subscription. Hopefully it doesn't break too quickly, as it's nice to know I have an offsite backup in the case of a major catastrophe (fire, flood, burglary) at home.
 

Paul W.

Cadet
Joined
Dec 1, 2015
Messages
9
I had a working 4.5.X install on 9.3.1. I updated to 9.3.10 (or whatever the 10.X rebase is called), and my client computer updated to 4.6 within about an hour. I am no longer able to connect from the client computer.

I cannot be certain as to which of the two events (updating FreeNas or Crashplan) caused the outage, but I am again without my backup. Crashplan may lose to another provider soon.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
It really is never ending the work to keep this application running. Sad considering at one point, it seemed to work for almost a year straight.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I hate to be a broken record, but use a Linux VM (any flavor will work) with a lightweight GUI. The fundamental problem is that CrashPlan wasn't designed to be headless, and it looks like they're doing whatever they can to prevent it from being used headlessly (a secondary problem is that it really isn't designed to run under FreeBSD). I don't know why they'd be trying to deliberately sabotage this capability, but I'm having trouble thinking of any alternate explanation for the frequent and major changes that have been made in the way it's configured.

Export the datasets you want to back up using NFS (or share via CIFS if you prefer, but NFS is simpler). Mount them (read-only, if you prefer) in the Linux VM. Install CrashPlan in the VM. Use VNC to connect to the VM as necessary or desired to see what's going on with it. Since the GUI client is running locally to the "server", you don't have any of the headless problems that plague us when we try to use the FreeNAS plugin. You can install the VM in a VirtualBox jail, or on a separate VM host, as you prefer.
 

wtfR6a

Explorer
Joined
Jan 9, 2016
Messages
88
Yeah, Im looking for a more enterprise like solution. The constant issues are a PITA.
I was going to give rclone and Amazon Cloud Drive a spin, looks like unlimited storage for $60 per year, 300mbit+ uploads reported by some users and without the PITA of the Crashplan java nonsense.
You can use 'encfs' to encrypt your uploads too. Anyone whose tried it let me know how it went - save me a weekend faffing around if it doesn't work!
 
Status
Not open for further replies.
Top