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:

  • 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!

6 comments
  1. I wonder if there’s a workaround for QNAPs running on ARM processors?

    1. Hmm… good question! You probably could install Crashplan on QNAP and then overwrite the /opt/crashplan/jre (Java Runtime Environment) with the ARM JRE? That might work, but I have no way of testing. ARM JRE: http://wiki.qnap.com/wiki/Category:JRE

      1. I updated CrashPlan client (3.5.3 -> 3.6.3) on my Mac and noted that only 2 files in lib folder were updated:

        c42_protolib.jar
        com.backup42.desktop.jar

        It seems that replacing those 2 files on QNAP updates CrashPlan to the latest version without any issues (as per this discussion: http://forum.qnap.com/viewtopic.php?f=227&t=90663&p=400310).

        However, one may want to upgrade to 3.6.3 version by downloading & installing QPKG (http://forum.qnap.com/viewtopic.php?f=227&t=39078).

        1. Looks like an easier solution, thanks!

  2. help trying to upgrade to latest crashplan as crashplan keeps shutting down on QNAP NAS as it tries to keep upgrading itself, fails and shutsdown the Crashplan service

    [/share/Archive/CrashPlan_4.4.1_Linux/crashplan-install] # ./install.sh ./install.sh: line 29: who: command not found

    Welcome to the CrashPlan Installer.

    Press enter to continue with installation.

    Validating environment…

    NOTE: You are apparently not installing as root. While it is recommended to
    install as root it is not required. If you continue to install as admin
    then CrashPlan will only be able to back up files readable by admin.

    Would you like to switch users and install as root? (y/n) [y]
    switching to root
    ./install.sh: line 88: sudo: command not found
    [/share/Archive/CrashPlan_4.4.1_Linux/crashplan-install] #

    1. Hi – I’ve gone from the custom install over to a more community-supported install, the qpkg mentioned on the qnap forums. Install instructions here and over on the qnap forums also.

      Hopefully that makes our lives more simple for keeping crashplan up-to-date.

      As far as your above problem, it looks like the script is trying to run the command “who” (to determine which user is running the script), and it cannot find the “who” program. So then it needs to know if your user (admin probably) is root (which admin is), and sudo doesn’t exist on qnap… Like I mentioned, it’s probably easier to go over to the qpkg-maintained crashplan installer! 🙂

      Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *