~ read.

Install CrashPlan on a Synology DS413

Today I wanted to start an offsite backup of my Synology DS413. CrashPlan seemed to be the best solution.

I went through a lot of issues in the process, and wanted to share my experience here. My offsite backup to CrashPlan is now fully working !

Having CrashPlan on a Synology is made possible by the amazing work of Patters, from pcloadletter.co.uk.

The main trouble I had was because of a bug with PowerPC CPU in the latest version of his package. This version tried to enable the "Watch file system in real-time" functionnality of CrashPlan. Unfortunatly, it seems to have troubles with some CPU architectures, and Patters temporarily disabled his package for those in his package repository. This is why the package is not available to install directly from Package Center.

Patters is hard at work to find a solution to get the package to work again on PowerPC. In the meanwhile, to install CrashPlan on a Synology with a PowerPC CPU, we just have to manually install the previous version of his package.

Here is the full process documented, from the installation of Java to the configuration of the CrashPlan client.

  1. Add pcloadletter packages source
  2. Install Java
  3. Manually install CrashPlan 3.6.3 package
  4. Install CrashPlan client on PC
  5. Change client config to connect to Synology instead of local
  6. Configure CrashPlan
  7. Enjoy !

Add pcloadletter packages source

First thing to do is to add Patters packages source. This will let us install Java and CrashPlan easily.

  1. Connect on your Synology WebUI
  2. Open Package Center
  3. Go to Settings -> Package Sources
  4. Add the URL http://packages.pcloadletter.co.uk/
  5. Press OK
  6. Go to the General tab
  7. Adjust the Trust level to "Any publisher"
  8. Press OK

Install Java

Now, we have to install Java on our NAS. Fortunalty, Patters had us covered with great packages too !

Java cannot be embedded directly in a Synology package, so we will have to download and put the file in a "public" shared folder on our Synology. Then, the package will automatically take it and install it.

  1. If you don't already have a shared folder called "public" on your Synology, create one and grant access to everyone.
  2. Go to Package Center
  3. Go to the "Community" section
  4. Install the package "Java SE Embedded 7", an error message will appear, don't worry. It will tell you exactly which file to download on the Oracle website.
  5. Go on the Oracle website and download the file specified in the error message shown
  6. Place this file in the "public" shared folder of your Synology
  7. Start again the installation of the package "Java SE Embedded 7" from the "Community" tab of your Synology's Package Center
  8. This time, the install should be successful. Java is now installed ! (the package does not need to be in "running" state to work)

Manually install CrashPlan 3.6.3 package

Now that Java is installed, we can install the CrashPlan package.

If your CPU is compatible with the last version, you can install if directly from the "Community" tab of your Synology's Package Center.

If, instead, the package does not appear here, you probably have a PowerPC CPU and we will manually install the previous version.

  1. Download CrashPlan for Synology package v3.6.3 from Patters website (CrashPlan PRO and PROe packages can be found here)
  2. Open Package Center on your Synology
  3. Click on "Manual install" on top
  4. Browse for the downloaded package on your computer
  5. Click "Next" and proceed to install
  6. Once the package is installed, you will have to stop and start it again before you can use it

Install CrashPlan client on your computer

Now that CrashPlan is running on our Synology, we have to install the client on our computer to configure it.

  1. Download the client from CrashPlan's website
  2. Follow the instructions to install it

Change client config to connect to Synology instead of local

We will now change the CrashPlan's client config to have it connect to our Synology's CrashPlan instead of our local install.

Instructions will be for Mac OS, but with some edits you can get it to work on Linux/Windows too. You can find the location of the file to edit (ui.properties) for the various OS on CrashPlan's website here.

1_ Copy "ui.properties" to user's library

cp /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties ~/Library/Application\ Support/CrashPlan/ui.local.properties  
cp /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties ~/Library/Application\ Support/CrashPlan/ui.remote.properties  

2_ Edit the remote (Synology) config file

vi ~/Library/Application\ Support/CrashPlan/ui.remote.properties  

4_ Change serviceHost=127.0.0.1 to your Synology IP (on your LAN network) and remove comment (#) before the line

#Fri Dec 09 09:50:22 CST 2005
serviceHost=192.168.1.12  
#servicePort=4243
#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=

5_ Save file

6_ Create a script to easily switch between configurations and launch CrashPlan client

vi ~/bin/cpLaunch  
#!/bin/bash

cd ~/Library/Application\ Support/CrashPlan/

if [[ "$1" == "synology" ]]; then  
    echo "Switching CrashPlan client to Synology..."
    cp ui.remote.properties /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties;
else  
    echo "Switching CrashPlan client to local..."
    cp ui.local.properties /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties;
fi

cd ~;

echo "Starting CrashPlan client..."

nohup /Applications/CrashPlan.app/Contents/MacOS/CrashPlan & exit  

Then make it executable :

chmod +x ~/bin/cpLaunch  

You can then launch CrashPlan client to connect to local server by running ~/bin/cpLaunch and to connect to Synology's CrashPlan : ~/bin/cpLaunch synology.

Configure CrashPlan

Now you can connect to your CrashPlan account, configure the folders you want to backup and start it up !

Enjoy !

Slow speed ?

If the speed seems to be very slow, you can try this buide to speed things up : http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/

Please be aware of the possible implications of the modification of these settings outlined by the CrashPlan's team : http://lifehacker.com/we-were-very-proud-when-lifehacker-readers-voted-us-the-1659807506

First, we need to edit CrashPlan's settings :

  1. On CrashPlan client, go to Settings
  2. Go to "Backup" tab
  3. Click "Configure..." next to "Advanced settings"
  4. Change Compression to Off (optional)
  5. Change Data de-duplication to Minimal

And then we can edit a config file to completly disable data de-duplication on WAN :

  1. Enable SSH on Synology
  2. Connect with SSH
  3. Edit file [email protected]/CrashPlan/conf/my.service.xml
  4. Change line <dataDeDupAutoMaxFileSizeForWan>0</dataDeDupAutoMaxFileSizeForWan> with <dataDeDupAutoMaxFileSizeForWan>1</dataDeDupAutoMaxFileSizeForWan>

Then we need to restart CrashPlan service and client.

  1. On client, double-click on CrashPlan's logo
  2. In the textbox on top, type ra, restart
  3. Press ENTER and wait for client to close
  4. You can manually open client again after a few seconds

Package won't start ?

If after a reboot, the package won't start, it's maybe because the tmp folder used by Java was removed.

To confirm this, you can SSH on your Synology and then execute :

cat [email protected]/CrashPlan/log/engine_output.log  

Then you should see something like this :

[12.01.14 19:04:01.961 INFO    main                 root                                    ] JVM temp directory [email protected] does not exist!

To fix this issue, we will change the Java temp directory to a real existing one.

Open the run.conf file :

vi [email protected]/CrashPlan/bin/run.conf  

Search for [email protected] and change it to [email protected].

The [email protected] already exists on your system, you don't have to create it. And it will be available at every system restart.

This bug seems to have been fixed the same way in the last version of the package (we can't install it for now, as it's not compatible with PowerPC).

Then start CrashPlan from your Synology's Package Center, and you're ready to backup again !

Resources