Category: QNAP

Update CrashPlan on QNAP

It’s happened to me twice now: CrashPlan stops backing up my files apparently due to a failed software update. I usually don’t know CrashPlan has stopped backing up until I get the weekly email status update. Fortunately, the files that I back up to CrashPlan are not changed often at all, and missing a backup for a couple days isn’t the end of the world.

I have CrashPlan installed on my QNAP (see my previous post about that), and CrashPlan smartly autoupdates their software every now and then. Unfortunately this autoupdate doesn’t seem to work when installed on QNAP. The following instructions should help get CrashPlan updated and running again smoothly.

Connect to the CrashPlan server running on QNAP by first creating an SSH tunnel to QNAP and then open the GUI client locally (connecting to the CrashPlan server through the ssh tunnel). The GUI reports that “CrashPlan Upgrade Failed. CrashPlan failed to apply an upgrade and will try again automatically in one hour…”
crashplanupgradefailed

How to upgrade (I had version 3.2.1 installed, version 3.4.1 was available):

  • Stop the CrashPlan server:

    $ /share/MD0_DATA/.qpkg/crashplan/cprun.sh stop
    
  • Move the existing CrashPlan installation out of the way:

    $ mv /opt/crashplan /opt/crashplan.bak
    
  • Download the latest linux version of CrashPlan, decompress the tarball, etc

    $ wget http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_3.4.1_Linux.tgz
    $ tar xzvf CrashPlan_3.4.1_Linux.tgz
    $ rm CrashPlan_3.4.1_Linux.tgz
    
  • Edit the CrashPlan install.sh, replace the bash path and add BINSLOC at the top:

    $ cd CrashPlan-install
    $ nano install.sh
    #!/opt/bin/bash
    BINSLOC="/bin /opt/bin /usr/bin /usr/local/bin"
    
  • Now, run the install script:

    $ ./install.sh
    Would you like to switch users and install as root? (y/n) [y] n
      installing as current user
    No Java VM could be found in your path
    Would you like to download the JRE and dedicate it to CrashPlan? (y/n) [y] y
      jre will be downloaded
    
    ...
    
    Do you accept and agree to be bound by the EULA? (yes/no) yes
    
    What directory do you wish to install CrashPlan to? [/root/crashplan] /opt/crashplan
    /opt/crashplan does not exist.  Create /opt/crashplan? (y/n) [y] y
    
    What directory do you wish to store backups in? [/opt/crashplan/manifest]  
    /opt/crashplan/manifest does not exist.  Create /opt/crashplan/manifest? (y/n) [y] 
    
    Your selections:
    CrashPlan will install to: /opt/crashplan
    And store datas in: /opt/crashplan/manifest
    
    Is this correct? (y/n) [y] y
    
    ...
    
    ./install.sh: /opt/crashplan/bin/CrashPlanEngine: /bin/bash: bad interpreter: No such file or directory
    
    CrashPlan has been installed and the Service has been started automatically.
    
  • Oops, need to fix some paths in /opt/crashplan/bin/CrashPlanEngine. Add the BINSLOC at the top of the file, and add the full path to nice:

    #!/opt/bin/bash
    BINSLOC="/bin /opt/bin /usr/bin /usr/local/bin"
    ...
    /opt/bin/nice -n 19 $JAVACOMMON $SRV_JAVA_OPTS -classpath $FULL_CP com.backup42.service.CPService > $TARGETDIR/log/engine_output.log 2>
    $TARGETDIR/log/engine_error.log &
    
  • Now, move the backed up configuration/cache folders into place:

    $ mv /opt/crashplan.bak/conf /opt/crashplan/
    $ mv /opt/crashplan.bak/cache /opt/crashplan/
    $ mv /opt/crashplan.bak/manifest /opt/crashplan/
    
  • Then start CrashPlan:

    $ /share/MD0_DATA/.qpkg/crashplan/cprun.sh start
    
  • Connect from the client and verify in the GUI that the server is now working:
    crashplanupgradesuccessful
  • And finally, clean up the unused, old crashplan backup (mine was 2.1GB as there seemed to be 100s of failed yet downloaded upgrade attempts):

    $ rm -rf /opt/crashplan.bak
    

Happy CrashPlanning!

CrashPlan on QNAP

First up on my QNAP: offsite backup of my data in “the cloud”. QNAP’s recommended and integrated cloud backup provider was a bit too expensive for my taste, especially since I plan to backup nearly 1TB of data. After some serious googling I found the perfect candidate: CrashPlan.

CrashPlan’s software–written in Java–has two components, a server and a GUI client. This makes it a perfect candidate for QNAP. Get the server running in headless mode on my QNAP, then connect to it via the GUI client from my desktop machine.

  • First up with the QNAP, install Optware IPKG.
  • Then follow Cokeman’s excellent guide for CrashPlan on a QNAP.
  • Installed CrashPlan for OSX and modded the ui.properties file to servicePort=4200 as in CrashPlan’s docs (to edit I used TextMate):
    $ mate /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties
    
  • Added a tunnel to my QNAP in SSHKeyChain(an excellent program to manage SSH connections and tunnels):

    SSHKeyChain CrashPlan tunnel configuration

    SSHKeyChain CrashPlan tunnel configuration

  • Open CrashPlan on Mac. Because of the ui.propertiesconfiguration change, you will now be connecting from CrashPlan’s Mac GUI to the CrashPlan engine on QNAP. Go through the CrashPlan setup, configure backup options, done!

    Connecting to headless CrashPlan engine via OSX GUI

    Connecting to headless CrashPlan engine via OSX GUI

Auf Wiedersehen Frankenstein, hello QNAP

My homemade server running Ubuntu started to experience strange hardware issues (random crashing, etc). Over the course of a year I replaced and fiddled with memory, motherboard, and hard drives yet still I had random crashes (would even randomly crash running memtest, so I ruled out a software issue). Since the server was my home NAS, I began to rethink the idea of maintaining unreliable hardware (and throwing money away left and right).

Out with Frankenstein, enter the QNAP TS-459 Pro II Turbo NAS. Fitted with four WD 2TB drives in RAID-5 my new QNAP has been extremely reliable, quiet, energy efficient (measured 39W at load!) and space-saving! Frankenstein was a huge server tower, the new QNAP is a tiny 18x18x24cm block that rests nicely under a cabinet. And quiet enough to be unenclosed: fan noise is imperceptible, yet faint hard drive noise can sometimes be heard if the room is totally silent. The QNAP is connected to a CyberPower UPS (as are my internet modem and router). The UPS and NAS fit nicely under a cabinet in the living room:

QNAP TS-459 Pro II Turbo NAS

QNAP TS-459 Pro II Turbo NAS and CyberPower DX 600E UPS Green Power

The QNAP’s web GUI is less than perfect (I find it slow, illogical, and limiting) and as I subsequently found out, the command-line configuration is also less than perfect. But the reliability, quietness, and “it just works”-feel of the QNAP so far has me quite happy. That said, going from a completely configurable linux server to a more closed system like the QNAP was going to take some getting used to. I plan on writing a series of posts documenting the changes I make to my new QNAP to customize it to be my perfect little AFP NAS.

Stay tuned, more to come!