CrashPlan packages for Synology NAS

UPDATE – The instructions and notes on this page apply to all three versions of the package hosted on my repo: CrashPlan, CrashPlan PRO, and CrashPlan PROe.

CrashPlan is a popular online backup solution which supports continuous syncing. With this your NAS can become even more resilient – it could even get stolen or destroyed and you would still have your data. Whilst you can pay a small monthly charge for a storage allocation in the Cloud, one neat feature CrashPlan offers is for individuals to collaboratively backup their important data to each other – for free! You could install CrashPlan on your laptop and have it continuously protecting your documents to your NAS, even whilst away from home.

CrashPlan-Windows

CrashPlan is a Java application, and difficult to install on a NAS. Way back in January 2012 I decided to simplify it into a Synology package, since I had already created a few others. As I started I used information from Kenneth Larsen’s blog post, the Vincesoft blog article for installing on ARM processor Iomega NAS units, and this handy PDF document which is a digest of all of them. I used the PowerPC binaries Christophe had compiled on his chreggy.fr blog, so thanks go to him. I wanted make sure the package didn’t require the NAS to be bootstrapped, so I bundled any dependent binaries. Back in 2012 I didn’t know how to cross compile properly so I had to use versions I had found, but over the years I have had to compile my own versions of many of these binaries, especially as I added support for Synology’s huge proliferation of different CPU architectures.

UPDATE – For version 3.2 I also had to identify and then figure out how to compile Tim Macinta’s fast MD5 library, to fix the supplied libmd5.so on ARM systems (CrashPlan only distributes libraries for x86). I’m documenting that process here in case more libs are required in future versions. I identified it from the error message in log/engine_error.log and by running objdump -x libmd5.so. I could see that the same Java_com_twmacinta_util_MD5_Transform_1native function mentioned in the error was present in the x86 lib but not in my compiled libmd5.so from W3C Libwww. I took the headers from an install of OpenJDK on a regular Ubuntu desktop. I then used the Linux x86 source from the download bundle on Tim’s website – the closest match – and compiled it directly on the syno using the command line from a comment in another version of that source:
gcc -O3 -shared -I/tmp/jdk_headers/include /tmp/fast-md5/src/lib/arch/linux_x86/MD5.c -o libmd5.so

Licence compliance is another challenge – Code 42 Software’s EULA prohibits redistribution of their work. I had to make the syno package download CrashPlan for Linux (after the end user agrees their EULA), then I had to write my own script to extract this archive and mimic their installer, since their installer is interactive

 

Synology Package Installation

  • In Synology DSM’s Package Center, click Settings and add my package repository:
    Add Package Repository
  • The repository will push its certificate automatically to the NAS, which is used to validate package integrity. Set the Trust Level to Synology Inc. and trusted publishers:
    Trust Level
  • Now browse the Community section in Package Center to install CrashPlan:
    Community-packages
    The repository only displays packages which are compatible with your specific model of NAS. If you don’t see CrashPlan in the list, then either your NAS model or your DSM version are not supported at this time. DSM 5.0 is the minimum supported version for this package.
  • Since CrashPlan is a Java application, it needs a Java Runtime Environment (JRE) to function. It is recommended that you select to have the package install a dedicated Java 7 runtime. For licensing reasons I cannot include Java with this package, so you will need to agree to the licence terms and download it yourself from Oracle’s website. The package expects to find this .tar.gz file in a shared folder called ‘public’. If you go ahead and try to install the package without it, the error message will indicate precisely which Java file you need for your system type, and it will provide a TinyURL link to the appropriate Oracle download page.
  • If you have a multi-bay NAS, use the Shared Folder control panel to create the shared folder called public (it must be all lower case). On single bay models this is created by default. Assign it with Read/Write privileges for everyone.
  • If you have trouble getting the Java archive recognised, try downloading it with a different web browser. Some browsers try to help by uncompressing the file, or renaming it without warning. I have tried to code around most of these behaviours. Use Firefox if all else fails – it seems to be the only browser that doesn’t interfere with the file. I also suggest that you leave the Java file and the public folder present once you have installed the package, so that you won’t need to fetch this again to install future updates to the CrashPlan package.
  • CrashPlan is installed in headless mode – backup engine only. This is configured by a desktop client, but operates independently of it.
  • The first time you start the CrashPlan package you will need to stop it and restart it before you can connect the client. This is because a config file that is only created on first run needs to be edited by one of my scripts. The engine is then configured to listen on all interfaces on the default port 4243.
  • If you previously installed CrashPlan manually using the Synology Wiki, you can find uninstall instructions here.
 

CrashPlan Client Installation

  • Once the CrashPlan engine is running on the NAS, you can manage it by installing CrashPlan on another computer, and by configuring it to connect to the NAS instance of the CrashPlan Engine.
  • Make sure that you install the version of the CrashPlan client that matches the version running on the NAS. If the NAS version gets upgraded later, you will need to update your client computer too.
  • By default the client is configured to connect to the CrashPlan engine running on the local computer. You will need to edit the file conf/ui.properties in the CrashPlan folder on that computer so that this line:
    #serviceHost=127.0.0.1
    is uncommented (by removing the hash symbol) and set to the IP address of your NAS, e.g.:
    serviceHost=192.168.1.210
    Mac OS X users can edit this file from the Terminal using:
    sudo nano /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties
    (use Ctrl-X to save changes and exit)
  • Starting with CrashPlan version 4.3.0 you will also need to run this command on your NAS from an SSH session:
    echo `cat /var/lib/crashplan/.ui_info`
    Note those are backticks not quotes. This will give you a port number (4243), followed by an authentication token, followed by the IP binding (0.0.0.0 means the server is listening for connections on all interfaces) e.g.:
    4243,9ac9b642-ba26-4578-b705-124c6efc920b,0.0.0.0
    port,--------------token-----------------,binding

    Copy this token value and use this value to replace the token in the equivalent config file on the computer that you would like to run the CrashPlan client on – located here:
    C:\ProgramData\CrashPlan\.ui_info (Windows)
    “/Library/Application Support/CrashPlan/.ui_info” (Mac OS X installed for all users)
    “~/Library/Application Support/CrashPlan/.ui_info” (Mac OS X installed for single user)
    /var/lib/crashplan/.ui_info (Linux)
    You will not be able to connect the client unless the client token matches on the NAS token. On the client you also need to amend the IP address value after the token to match the Synology NAS IP address (this was a new requirement with CrashPlan version 4.4.1).
    so using the example above, your computer’s CrashPlan client config file would be edited to:
    4243,9ac9b642-ba26-4578-b705-124c6efc920b,192.168.1.100
    assuming that the Synology NAS has the IP 192.168.1.100
    If it still won’t connect, check that the ServicePort value is set to 4243 in the following file:
    C:\ProgramData\CrashPlan\conf\ui_(username).properties (Windows)
    “/Library/Application Support/CrashPlan/ui.properties” (Mac OS X installed for all users)
    “~/Library/Application Support/CrashPlan/ui.properties” (Mac OS X installed for single user)
    /usr/local/crashplan/conf (Linux)
  • As a result of the nightmarish complexity of recent product changes Code42 has now published a support article with more detail on running headless systems including config file locations on all supported operating systems, and for ‘all users’ versus single user installs etc.
  • You should disable the CrashPlan service on your computer if you intend only to use the client. In Windows, open the Services section in Computer Management and stop the CrashPlan Backup Service. In the service Properties set the Startup Type to Manual. You can also disable the CrashPlan System Tray notification application by removing it from Task Manager > More Details > Start-up Tab (Windows 8/Windows 10) or the All Users Startup Start Menu folder (Windows 7).
    To accomplish the same on Mac OS X, run the following commands one by one:

    sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist
    sudo mv /Library/LaunchDaemons/com.crashplan.engine.plist /Library/LaunchDaemons/com.crashplan.engine.plist.bak

    The CrashPlan menu bar application can be disabled in System Preferences > Users & Groups > Current User > Login Items

 

Notes

  • The package downloads the CrashPlan installer directly from Code 42 Software, following acceptance of their EULA. I am complying with their wish that no one redistributes it.
  • Real-time backup does not work on PowerPC systems for some unknown reason, despite many attempts to cross compile libjna, and attempts to use binaries taken from various Debian distros (methods that work for the other supported CPU architectures).
  • The engine daemon script checks the amount of system RAM and scales the Java heap size appropriately (up to the default maximum of 512MB). This can be overridden in a persistent way if you are backing up large backup sets by editing /var/packages/CrashPlan/target/syno_package.vars. If you are considering buying a NAS purely to use CrashPlan and intend to back up more than a few hundred GB then I strongly advise buying one of the models with upgradeable RAM. Memory is very limited on the cheaper models. I have found that a 512MB heap was insufficient to back up more than 2TB of files on a Windows server and that was the situation many years ago. It kept restarting the backup engine every few minutes until I increased the heap to 1024MB. Many users of the package have found that they have to increase the heap size or CrashPlan will halt its activity. This can be mitigated by dividing your backup into several smaller backup sets which are scheduled to be protected at different times. Note that from package version 0041, using the dedicated JRE on a 64bit Intel NAS will allow a heap size greater than 4GB since the JRE is 64bit (requires DSM 6.0 in most cases).
  • The default location for saving friends’ backups is set to /volume1/crashplan/backupArchives (where /volume1 is you primary storage volume) to eliminate the chance of them being destroyed accidentally by uninstalling the package.
  • If you need to manage CrashPlan from a remote location, I suggest you do so using SSH tunnelling as per this support document.
  • The package supports upgrading to future versions while preserving the machine identity, logs, login details, and cache. Upgrades can now take place without requiring a login from the client afterwards.
  • If you remove the package completely and re-install it later, you can re-attach to previous backups. When you log in to the Desktop Client with your existing account after a re-install, you can select “adopt computer” to merge the records, and preserve your existing backups. I haven’t tested whether this also re-attaches links to friends’ CrashPlan computers and backup sets, though the latter does seem possible in the Friends section of the GUI. It’s probably a good idea to test that this survives a package reinstall before you start relying on it. Sometimes, particularly with CrashPlan PRO I think, the adopt option is not offered. In this case you can log into CrashPlan Central and retrieve your computer’s GUID. On the CrashPlan client, double-click on the logo in the top right and you’ll enter a command line mode. You can use the GUID command to change the system’s GUID to the one you just retrieved from your account.
  • The log which is displayed in the package’s Log tab is actually the activity history. If you are trying to troubleshoot an issue you will need to use an SSH session to inspect these log files:
    /var/packages/CrashPlan/target/log/engine_output.log
    /var/packages/CrashPlan/target/log/engine_error.log
    /var/packages/CrashPlan/target/log/app.log
  • When CrashPlan downloads and attempts to run an automatic update, the script will most likely fail and stop the package. This is typically caused by syntax differences with the Synology versions of certain Linux shell commands (like rm, mv, or ps). The startup script will attempt to apply the published upgrade the next time the package is started.
  • Although CrashPlan’s activity can be scheduled within the application, in order to save RAM some users may wish to restrict running the CrashPlan engine to specific times of day using the Task Scheduler in DSM Control Panel:
    Schedule service start
    This is particularly useful on ARM systems because CrashPlan currently prevents hibernation while it is running (unresolved issue, reported to Code 42). Note that regardless of real-time backup, by default CrashPlan will scan the whole backup selection for changes at 3:00am. Include this time within your Task Scheduler time window or else CrashPlan will not capture file changes which occurred while it was inactive:
    Schedule Service Start

  • If you decide to sign up for one of CrashPlan’s paid backup services as a result of my work on this, please consider donating using the PayPal button on the right of this page.
 

Package scripts

For information, here are the package scripts so you can see what it’s going to do. You can get more information about how packages work by reading the Synology 3rd Party Developer Guide.

installer.sh

#!/bin/sh

#--------CRASHPLAN installer script
#--------package maintained at pcloadletter.co.uk


DOWNLOAD_PATH="http://download2.code42.com/installs/linux/install/${SYNOPKG_PKGNAME}"
CP_EXTRACTED_FOLDER="crashplan-install"
OLD_JNA_NEEDED="false"
[ "${SYNOPKG_PKGNAME}" == "CrashPlan" ] && DOWNLOAD_FILE="CrashPlan_4.8.0_Linux.tgz"
[ "${SYNOPKG_PKGNAME}" == "CrashPlanPRO" ] && DOWNLOAD_FILE="CrashPlanPRO_4.8.0_Linux.tgz"
if [ "${SYNOPKG_PKGNAME}" == "CrashPlanPROe" ]; then
  CP_EXTRACTED_FOLDER="${SYNOPKG_PKGNAME}-install"
  OLD_JNA_NEEDED="true"
  [ "${WIZARD_VER_480}" == "true" ] && { CPPROE_VER="4.8.0"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${WIZARD_VER_470}" == "true" ] && { CPPROE_VER="4.7.0"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${WIZARD_VER_460}" == "true" ] && { CPPROE_VER="4.6.0"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${WIZARD_VER_452}" == "true" ] && { CPPROE_VER="4.5.2"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${WIZARD_VER_450}" == "true" ] && { CPPROE_VER="4.5.0"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${WIZARD_VER_441}" == "true" ] && { CPPROE_VER="4.4.1"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${WIZARD_VER_430}" == "true" ] && CPPROE_VER="4.3.0"
  [ "${WIZARD_VER_420}" == "true" ] && CPPROE_VER="4.2.0"
  [ "${WIZARD_VER_370}" == "true" ] && CPPROE_VER="3.7.0"
  [ "${WIZARD_VER_364}" == "true" ] && CPPROE_VER="3.6.4"
  [ "${WIZARD_VER_363}" == "true" ] && CPPROE_VER="3.6.3"
  [ "${WIZARD_VER_3614}" == "true" ] && CPPROE_VER="3.6.1.4"
  [ "${WIZARD_VER_353}" == "true" ] && CPPROE_VER="3.5.3"
  [ "${WIZARD_VER_341}" == "true" ] && CPPROE_VER="3.4.1"
  [ "${WIZARD_VER_33}" == "true" ] && CPPROE_VER="3.3"
  DOWNLOAD_FILE="CrashPlanPROe_${CPPROE_VER}_Linux.tgz"
fi
DOWNLOAD_URL="${DOWNLOAD_PATH}/${DOWNLOAD_FILE}"
CPI_FILE="${SYNOPKG_PKGNAME}_*.cpi"
OPTDIR="${SYNOPKG_PKGDEST}"
VARS_FILE="${OPTDIR}/install.vars"
SYNO_CPU_ARCH="`uname -m`"
[ "${SYNO_CPU_ARCH}" == "x86_64" ] && SYNO_CPU_ARCH="i686"
[ "${SYNO_CPU_ARCH}" == "armv5tel" ] && SYNO_CPU_ARCH="armel"
[ "${SYNOPKG_DSM_ARCH}" == "armada375" ] && SYNO_CPU_ARCH="armv7l"
[ "${SYNOPKG_DSM_ARCH}" == "armada38x" ] && SYNO_CPU_ARCH="armhf"
[ "${SYNOPKG_DSM_ARCH}" == "comcerto2k" ] && SYNO_CPU_ARCH="armhf"
[ "${SYNOPKG_DSM_ARCH}" == "alpine" ] && SYNO_CPU_ARCH="armhf"
[ "${SYNOPKG_DSM_ARCH}" == "alpine4k" ] && SYNO_CPU_ARCH="armhf"
[ "${SYNOPKG_DSM_ARCH}" == "monaco" ] && SYNO_CPU_ARCH="armhf"
NATIVE_BINS_URL="http://packages.pcloadletter.co.uk/downloads/crashplan-native-${SYNO_CPU_ARCH}.tar.xz"   
NATIVE_BINS_FILE="`echo ${NATIVE_BINS_URL} | sed -r "s%^.*/(.*)%\1%"`"
OLD_JNA_URL="http://packages.pcloadletter.co.uk/downloads/crashplan-native-old-${SYNO_CPU_ARCH}.tar.xz"   
OLD_JNA_FILE="`echo ${OLD_JNA_URL} | sed -r "s%^.*/(.*)%\1%"`"
INSTALL_FILES="${DOWNLOAD_URL} ${NATIVE_BINS_URL}"
[ "${OLD_JNA_NEEDED}" == "true" ] && INSTALL_FILES="${INSTALL_FILES} ${OLD_JNA_URL}"
TEMP_FOLDER="`find / -maxdepth 2 -path '/volume?/@tmp' | head -n 1`"
#the Manifest folder is where friends' backup data is stored
#we set it outside the app folder so it persists after a package uninstall
MANIFEST_FOLDER="/`echo $TEMP_FOLDER | cut -f2 -d'/'`/crashplan"
LOG_FILE="${SYNOPKG_PKGDEST}/log/history.log.0"
UPGRADE_FILES="syno_package.vars conf/my.service.xml conf/service.login conf/service.model"
UPGRADE_FOLDERS="log cache"
PUBLIC_FOLDER="`synoshare --get public | sed -r "/Path/!d;s/^.*\[(.*)\].*$/\1/"`"
#dedicated JRE section
if [ "${WIZARD_JRE_CP}" == "true" ]; then
  DOWNLOAD_URL="http://tinyurl.com/javaembed"
  EXTRACTED_FOLDER="ejdk1.8.0_121"
  #detect systems capable of running 64bit JRE which can address more than 4GB of RAM
  [ "${SYNOPKG_DSM_ARCH}" == "x64" ] && SYNO_CPU_ARCH="x64"
  [ "`uname -m`" == "x86_64" ] && [ ${SYNOPKG_DSM_VERSION_MAJOR} -ge 6 ] && SYNO_CPU_ARCH="x64"
  if [ "${SYNO_CPU_ARCH}" == "armel" ]; then
    JAVA_BINARY="ejdk-8u121-linux-arm-sflt.tar.gz"
    JAVA_BUILD="ARMv5/ARMv6/ARMv7 Linux - SoftFP ABI, Little Endian 2"
  elif [ "${SYNO_CPU_ARCH}" == "armv7l" ]; then
    JAVA_BINARY="ejdk-8u121-linux-arm-sflt.tar.gz"
    JAVA_BUILD="ARMv5/ARMv6/ARMv7 Linux - SoftFP ABI, Little Endian 2"
  elif [ "${SYNO_CPU_ARCH}" == "armhf" ]; then
    JAVA_BINARY="ejdk-8u121-linux-armv6-vfp-hflt.tar.gz"
    JAVA_BUILD="ARMv6/ARMv7 Linux - VFP, HardFP ABI, Little Endian 1"
  elif [ "${SYNO_CPU_ARCH}" == "ppc" ]; then
    #Oracle have discontinued Java 8 for PowerPC after update 6
    JAVA_BINARY="ejdk-8u6-fcs-b23-linux-ppc-e500v2-12_jun_2014.tar.gz"
    JAVA_BUILD="Power Architecture Linux - Headless - e500v2 with double-precision SPE Floating Point Unit"
    EXTRACTED_FOLDER="ejdk1.8.0_06"
    DOWNLOAD_URL="http://tinyurl.com/java8ppc"
  elif [ "${SYNO_CPU_ARCH}" == "i686" ]; then
    JAVA_BINARY="ejdk-8u121-linux-i586.tar.gz"
    JAVA_BUILD="x86 Linux Small Footprint - Headless"
  elif [ "${SYNO_CPU_ARCH}" == "x64" ]; then
    JAVA_BINARY="jre-8u121-linux-x64.tar.gz"
    JAVA_BUILD="Linux x64"
    EXTRACTED_FOLDER="jre1.8.0_121"
    DOWNLOAD_URL="http://tinyurl.com/java8x64"
  fi
fi
JAVA_BINARY=`echo ${JAVA_BINARY} | cut -f1 -d'.'`
source /etc/profile


pre_checks ()
{
  #These checks are called from preinst and from preupgrade functions to prevent failures resulting in a partially upgraded package
  if [ "${WIZARD_JRE_CP}" == "true" ]; then
    synoshare -get public > /dev/null || (
      echo "A shared folder called 'public' could not be found - note this name is case-sensitive. " >> $SYNOPKG_TEMP_LOGFILE
      echo "Please create this using the Shared Folder DSM Control Panel and try again." >> $SYNOPKG_TEMP_LOGFILE
      exit 1
    )

    JAVA_BINARY_FOUND=
    [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.gz ] && JAVA_BINARY_FOUND=true
    [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar ] && JAVA_BINARY_FOUND=true
    [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.tar ] && JAVA_BINARY_FOUND=true
    [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.gz ] && JAVA_BINARY_FOUND=true
     
    if [ -z ${JAVA_BINARY_FOUND} ]; then
      echo "Java binary bundle not found. " >> $SYNOPKG_TEMP_LOGFILE
      echo "I was expecting the file ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.gz. " >> $SYNOPKG_TEMP_LOGFILE
      echo "Please agree to the Oracle licence at ${DOWNLOAD_URL}, then download the '${JAVA_BUILD}' package" >> $SYNOPKG_TEMP_LOGFILE
      echo "and place it in the 'public' shared folder on your NAS. This download cannot be automated even if " >> $SYNOPKG_TEMP_LOGFILE
      echo "displaying a package EULA could potentially cover the legal aspect, because files hosted on Oracle's " >> $SYNOPKG_TEMP_LOGFILE
      echo "server are protected by a session cookie requiring a JavaScript enabled browser." >> $SYNOPKG_TEMP_LOGFILE
      exit 1
    fi
  else
    if [ -z ${JAVA_HOME} ]; then
      echo "Java is not installed or not properly configured. JAVA_HOME is not defined. " >> $SYNOPKG_TEMP_LOGFILE
      echo "Download and install the Java Synology package from http://wp.me/pVshC-z5" >> $SYNOPKG_TEMP_LOGFILE
      exit 1
    fi

    if [ ! -f ${JAVA_HOME}/bin/java ]; then
      echo "Java is not installed or not properly configured. The Java binary could not be located. " >> $SYNOPKG_TEMP_LOGFILE
      echo "Download and install the Java Synology package from http://wp.me/pVshC-z5" >> $SYNOPKG_TEMP_LOGFILE
      exit 1
    fi

    if [ "${WIZARD_JRE_SYS}" == "true" ]; then
      JAVA_VER=`java -version 2>&1 | sed -r "/^.* version/!d;s/^.* version \"[0-9]\.([0-9]).*$/\1/"`
      if [ ${JAVA_VER} -lt 8 ]; then
        echo "This version of CrashPlan requires Java 8 or newer. Please update your Java package. "
        exit 1
      fi
    fi
  fi
}


preinst ()
{
  pre_checks
  cd ${TEMP_FOLDER}
  for WGET_URL in ${INSTALL_FILES}
  do
    WGET_FILENAME="`echo ${WGET_URL} | sed -r "s%^.*/(.*)%\1%"`"
    [ -f ${TEMP_FOLDER}/${WGET_FILENAME} ] && rm ${TEMP_FOLDER}/${WGET_FILENAME}
    wget ${WGET_URL}
    if [[ $? != 0 ]]; then
      if [ -d ${PUBLIC_FOLDER} ] && [ -f ${PUBLIC_FOLDER}/${WGET_FILENAME} ]; then
        cp ${PUBLIC_FOLDER}/${WGET_FILENAME} ${TEMP_FOLDER}
      else     
        echo "There was a problem downloading ${WGET_FILENAME} from the official download link, " >> $SYNOPKG_TEMP_LOGFILE
        echo "which was \"${WGET_URL}\" " >> $SYNOPKG_TEMP_LOGFILE
        echo "Alternatively, you may download this file manually and place it in the 'public' shared folder. " >> $SYNOPKG_TEMP_LOGFILE
        exit 1
      fi
    fi
  done
 
  exit 0
}


postinst ()
{
  if [ "${WIZARD_JRE_CP}" == "true" ]; then
    #extract Java (Web browsers love to interfere with .tar.gz files)
    cd ${PUBLIC_FOLDER}
    if [ -f ${JAVA_BINARY}.tar.gz ]; then
      #Firefox seems to be the only browser that leaves it alone
      tar xzf ${JAVA_BINARY}.tar.gz
    elif [ -f ${JAVA_BINARY}.gz ]; then
      #Chrome
      tar xzf ${JAVA_BINARY}.gz
    elif [ -f ${JAVA_BINARY}.tar ]; then
      #Safari
      tar xf ${JAVA_BINARY}.tar
    elif [ -f ${JAVA_BINARY}.tar.tar ]; then
      #Internet Explorer
      tar xzf ${JAVA_BINARY}.tar.tar
    fi
    mv ${EXTRACTED_FOLDER} ${SYNOPKG_PKGDEST}/jre-syno
    JRE_PATH="`find ${OPTDIR}/jre-syno/ -name jre`"
    [ -z ${JRE_PATH} ] && JRE_PATH=${OPTDIR}/jre-syno
    #change owner of folder tree
    chown -R root:root ${SYNOPKG_PKGDEST}
  fi
   
  #extract CPU-specific additional binaries
  mkdir ${SYNOPKG_PKGDEST}/bin
  cd ${SYNOPKG_PKGDEST}/bin
  tar xJf ${TEMP_FOLDER}/${NATIVE_BINS_FILE} && rm ${TEMP_FOLDER}/${NATIVE_BINS_FILE}
  [ "${OLD_JNA_NEEDED}" == "true" ] && tar xJf ${TEMP_FOLDER}/${OLD_JNA_FILE} && rm ${TEMP_FOLDER}/${OLD_JNA_FILE}

  #extract main archive
  cd ${TEMP_FOLDER}
  tar xzf ${TEMP_FOLDER}/${DOWNLOAD_FILE} && rm ${TEMP_FOLDER}/${DOWNLOAD_FILE} 
  
  #extract cpio archive
  cd ${SYNOPKG_PKGDEST}
  cat "${TEMP_FOLDER}/${CP_EXTRACTED_FOLDER}"/${CPI_FILE} | gzip -d -c - | ${SYNOPKG_PKGDEST}/bin/cpio -i --no-preserve-owner
  
  echo "#uncomment to expand Java max heap size beyond prescribed value (will survive upgrades)" > ${SYNOPKG_PKGDEST}/syno_package.vars
  echo "#you probably only want more than the recommended 1024M if you're backing up extremely large volumes of files" >> ${SYNOPKG_PKGDEST}/syno_package.vars
  echo "#USR_MAX_HEAP=1024M" >> ${SYNOPKG_PKGDEST}/syno_package.vars
  echo >> ${SYNOPKG_PKGDEST}/syno_package.vars

  cp ${TEMP_FOLDER}/${CP_EXTRACTED_FOLDER}/scripts/CrashPlanEngine ${OPTDIR}/bin
  cp ${TEMP_FOLDER}/${CP_EXTRACTED_FOLDER}/scripts/run.conf ${OPTDIR}/bin
  mkdir -p ${MANIFEST_FOLDER}/backupArchives    
  
  #save install variables which Crashplan expects its own installer script to create
  echo TARGETDIR=${SYNOPKG_PKGDEST} > ${VARS_FILE}
  echo BINSDIR=/bin >> ${VARS_FILE}
  echo MANIFESTDIR=${MANIFEST_FOLDER}/backupArchives >> ${VARS_FILE}
  #leave these ones out which should help upgrades from Code42 to work (based on examining an upgrade script)
  #echo INITDIR=/etc/init.d >> ${VARS_FILE}
  #echo RUNLVLDIR=/usr/syno/etc/rc.d >> ${VARS_FILE}
  echo INSTALLDATE=`date +%Y%m%d` >> ${VARS_FILE}
  [ "${WIZARD_JRE_CP}" == "true" ] && echo JAVACOMMON=${JRE_PATH}/bin/java >> ${VARS_FILE}
  [ "${WIZARD_JRE_SYS}" == "true" ] && echo JAVACOMMON=\${JAVA_HOME}/bin/java >> ${VARS_FILE}
  cat ${TEMP_FOLDER}/${CP_EXTRACTED_FOLDER}/install.defaults >> ${VARS_FILE}
  
  #remove temp files
  rm -r ${TEMP_FOLDER}/${CP_EXTRACTED_FOLDER}
  
  #add firewall config
  /usr/syno/bin/servicetool --install-configure-file --package /var/packages/${SYNOPKG_PKGNAME}/scripts/${SYNOPKG_PKGNAME}.sc > /dev/null
  
  #amend CrashPlanPROe client version
  [ "${SYNOPKG_PKGNAME}" == "CrashPlanPROe" ] && sed -i -r "s/^version=\".*(-.*$)/version=\"${CPPROE_VER}\1/" /var/packages/${SYNOPKG_PKGNAME}/INFO

  exit 0
}


preuninst ()
{
  `dirname $0`/stop-start-status stop

  exit 0
}


postuninst ()
{
  if [ -f ${SYNOPKG_PKGDEST}/syno_package.vars ]; then
    source ${SYNOPKG_PKGDEST}/syno_package.vars
  fi
  [ -e ${OPTDIR}/lib/libffi.so.5 ] && rm ${OPTDIR}/lib/libffi.so.5

  #delete symlink if it no longer resolves - PowerPC only
  if [ ! -e /lib/libffi.so.5 ]; then
    [ -L /lib/libffi.so.5 ] && rm /lib/libffi.so.5
  fi

  #remove firewall config
  if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then
    /usr/syno/bin/servicetool --remove-configure-file --package ${SYNOPKG_PKGNAME}.sc > /dev/null
  fi

 exit 0
}


preupgrade ()
{
  `dirname $0`/stop-start-status stop
  pre_checks
  #if identity exists back up config
  if [ -f /var/lib/crashplan/.identity ]; then
    mkdir -p ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/conf
    for FILE_TO_MIGRATE in ${UPGRADE_FILES}; do
      if [ -f ${OPTDIR}/${FILE_TO_MIGRATE} ]; then
        cp ${OPTDIR}/${FILE_TO_MIGRATE} ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/${FILE_TO_MIGRATE}
      fi
    done
    for FOLDER_TO_MIGRATE in ${UPGRADE_FOLDERS}; do
      if [ -d ${OPTDIR}/${FOLDER_TO_MIGRATE} ]; then
        mv ${OPTDIR}/${FOLDER_TO_MIGRATE} ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig
      fi
    done
  fi

  exit 0
}


postupgrade ()
{
  #use the migrated identity and config data from the previous version
  if [ -f ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/conf/my.service.xml ]; then
    for FILE_TO_MIGRATE in ${UPGRADE_FILES}; do
      if [ -f ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/${FILE_TO_MIGRATE} ]; then
        mv ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/${FILE_TO_MIGRATE} ${OPTDIR}/${FILE_TO_MIGRATE}
      fi
    done
    for FOLDER_TO_MIGRATE in ${UPGRADE_FOLDERS}; do
    if [ -d ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/${FOLDER_TO_MIGRATE} ]; then
      mv ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/${FOLDER_TO_MIGRATE} ${OPTDIR}
    fi
    done
    rmdir ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig/conf
    rmdir ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_data_mig
    
    #make CrashPlan log entry
    TIMESTAMP="`date "+%D %I:%M%p"`"
    echo "I ${TIMESTAMP} Synology Package Center updated ${SYNOPKG_PKGNAME} to version ${SYNOPKG_PKGVER}" >> ${LOG_FILE}
  fi
  
  exit 0
}
 

start-stop-status.sh

#!/bin/sh

#--------CRASHPLAN start-stop-status script
#--------package maintained at pcloadletter.co.uk


TEMP_FOLDER="`find / -maxdepth 2 -path '/volume?/@tmp' | head -n 1`"
MANIFEST_FOLDER="/`echo $TEMP_FOLDER | cut -f2 -d'/'`/crashplan" 
ENGINE_CFG="run.conf"
PKG_FOLDER="`dirname $0 | cut -f1-4 -d'/'`"
DNAME="`dirname $0 | cut -f4 -d'/'`"
OPTDIR="${PKG_FOLDER}/target"
PID_FILE="${OPTDIR}/${DNAME}.pid"
DLOG="${OPTDIR}/log/history.log.0"
CFG_PARAM="SRV_JAVA_OPTS"
JAVA_MIN_HEAP=`grep "^${CFG_PARAM}=" "${OPTDIR}/bin/${ENGINE_CFG}" | sed -r "s/^.*-Xms([0-9]+)[Mm] .*$/\1/"` 
SYNO_CPU_ARCH="`uname -m`"
TIMESTAMP="`date "+%D %I:%M%p"`"
FULL_CP="${OPTDIR}/lib/com.backup42.desktop.jar:${OPTDIR}/lang"
source ${OPTDIR}/install.vars
source /etc/profile
source /root/.profile


start_daemon ()
{
  #check persistent variables from syno_package.vars
  USR_MAX_HEAP=0
  if [ -f ${OPTDIR}/syno_package.vars ]; then
    source ${OPTDIR}/syno_package.vars
  fi
  USR_MAX_HEAP=`echo $USR_MAX_HEAP | sed -e "s/[mM]//"`

  #do we need to restore the identity file - has a DSM upgrade scrubbed /var/lib/crashplan?
  if [ ! -e /var/lib/crashplan ]; then
    mkdir /var/lib/crashplan
    [ -e ${OPTDIR}/conf/var-backup/.identity ] && cp ${OPTDIR}/conf/var-backup/.identity /var/lib/crashplan/
  fi

  #fix up some of the binary paths and fix some command syntax for busybox 
  #moved this to start-stop-status.sh from installer.sh because Code42 push updates and these
  #new scripts will need this treatment too
  find ${OPTDIR}/ -name "*.sh" | while IFS="" read -r FILE_TO_EDIT; do
    if [ -e ${FILE_TO_EDIT} ]; then
      #this list of substitutions will probably need expanding as new CrashPlan updates are released
      sed -i "s%^#!/bin/bash%#!$/bin/sh%" "${FILE_TO_EDIT}"
      sed -i -r "s%(^\s*)(/bin/cpio |cpio ) %\1/${OPTDIR}/bin/cpio %" "${FILE_TO_EDIT}"
      sed -i -r "s%(^\s*)(/bin/ps|ps) [^w][^\|]*\|%\1/bin/ps w \|%" "${FILE_TO_EDIT}"
      sed -i -r "s%\`ps [^w][^\|]*\|%\`ps w \|%" "${FILE_TO_EDIT}"
      sed -i -r "s%^ps [^w][^\|]*\|%ps w \|%" "${FILE_TO_EDIT}"
      sed -i "s/rm -fv/rm -f/" "${FILE_TO_EDIT}"
      sed -i "s/mv -fv/mv -f/" "${FILE_TO_EDIT}"
    fi
  done

  #use this daemon init script rather than the unreliable Code42 stock one which greps the ps output
  sed -i "s%^ENGINE_SCRIPT=.*$%ENGINE_SCRIPT=$0%" ${OPTDIR}/bin/restartLinux.sh

  #any downloaded upgrade script will usually have failed despite the above changes
  #so ignore the script and explicitly extract the new java code using the chrisnelson.ca method 
  #thanks to Jeff Bingham for tweaks 
  UPGRADE_JAR=`find ${OPTDIR}/upgrade -maxdepth 1 -name "*.jar" | tail -1`
  if [ -n "${UPGRADE_JAR}" ]; then
    rm ${OPTDIR}/*.pid > /dev/null
 
    #make CrashPlan log entry
    echo "I ${TIMESTAMP} Synology extracting upgrade from ${UPGRADE_JAR}" >> ${DLOG}

    UPGRADE_VER=`echo ${SCRIPT_HOME} | sed -r "s/^.*\/([0-9_]+)\.[0-9]+/\1/"`
    #DSM 6.0 no longer includes unzip, use 7z instead
    unzip -o ${OPTDIR}/upgrade/${UPGRADE_VER}.jar "*.jar" -d ${OPTDIR}/lib/ || 7z e -y ${OPTDIR}/upgrade/${UPGRADE_VER}.jar "*.jar" -o${OPTDIR}/lib/ > /dev/null
    unzip -o ${OPTDIR}/upgrade/${UPGRADE_VER}.jar "lang/*" -d ${OPTDIR} || 7z e -y ${OPTDIR}/upgrade/${UPGRADE_VER}.jar "lang/*" -o${OPTDIR} > /dev/null
    mv ${UPGRADE_JAR} ${TEMP_FOLDER}/ > /dev/null
    exec $0
  fi

  #updates may also overwrite our native binaries
  [ -e ${OPTDIR}/bin/libffi.so.5 ] && cp -f ${OPTDIR}/bin/libffi.so.5 ${OPTDIR}/lib/
  [ -e ${OPTDIR}/bin/libjtux.so ] && cp -f ${OPTDIR}/bin/libjtux.so ${OPTDIR}/
  [ -e ${OPTDIR}/bin/jna-3.2.5.jar ] && cp -f ${OPTDIR}/bin/jna-3.2.5.jar ${OPTDIR}/lib/
  if [ -e ${OPTDIR}/bin/jna.jar ] && [ -e ${OPTDIR}/lib/jna.jar ]; then
    cp -f ${OPTDIR}/bin/jna.jar ${OPTDIR}/lib/
  fi

  #create or repair libffi.so.5 symlink if a DSM upgrade has removed it - PowerPC only
  if [ -e ${OPTDIR}/lib/libffi.so.5 ]; then
    if [ ! -e /lib/libffi.so.5 ]; then
      #if it doesn't exist, but is still a link then it's a broken link and should be deleted first
      [ -L /lib/libffi.so.5 ] && rm /lib/libffi.so.5
      ln -s ${OPTDIR}/lib/libffi.so.5 /lib/libffi.so.5
    fi
  fi

  #set appropriate Java max heap size
  RAM=$((`free | grep Mem: | sed -e "s/^ *Mem: *\([0-9]*\).*$/\1/"`/1024))
  if [ $RAM -le 128 ]; then
    JAVA_MAX_HEAP=80
  elif [ $RAM -le 256 ]; then
    JAVA_MAX_HEAP=192
  elif [ $RAM -le 512 ]; then
    JAVA_MAX_HEAP=384
  elif [ $RAM -le 1024 ]; then
    JAVA_MAX_HEAP=512
  elif [ $RAM -gt 1024 ]; then
    JAVA_MAX_HEAP=1024
  fi
  if [ $USR_MAX_HEAP -gt $JAVA_MAX_HEAP ]; then
    JAVA_MAX_HEAP=${USR_MAX_HEAP}
  fi   
  if [ $JAVA_MAX_HEAP -lt $JAVA_MIN_HEAP ]; then
    #can't have a max heap lower than min heap (ARM low RAM systems)
    $JAVA_MAX_HEAP=$JAVA_MIN_HEAP
  fi
  sed -i -r "s/(^${CFG_PARAM}=.*) -Xmx[0-9]+[mM] (.*$)/\1 -Xmx${JAVA_MAX_HEAP}m \2/" "${OPTDIR}/bin/${ENGINE_CFG}"
  
  #disable the use of the x86-optimized external Fast MD5 library if running on ARM and PPC CPUs
  #seems to be the default behaviour now but that may change again
  [ "${SYNO_CPU_ARCH}" == "x86_64" ] && SYNO_CPU_ARCH="i686"
  if [ "${SYNO_CPU_ARCH}" != "i686" ]; then
    grep "^${CFG_PARAM}=.*c42\.native\.md5\.enabled" "${OPTDIR}/bin/${ENGINE_CFG}" > /dev/null \
     || sed -i -r "s/(^${CFG_PARAM}=\".*)\"$/\1 -Dc42.native.md5.enabled=false\"/" "${OPTDIR}/bin/${ENGINE_CFG}"
  fi

  #move the Java temp directory from the default of /tmp
  grep "^${CFG_PARAM}=.*Djava\.io\.tmpdir" "${OPTDIR}/bin/${ENGINE_CFG}" > /dev/null \
   || sed -i -r "s%(^${CFG_PARAM}=\".*)\"$%\1 -Djava.io.tmpdir=${TEMP_FOLDER}\"%" "${OPTDIR}/bin/${ENGINE_CFG}"

  #now edit the XML config file, which only exists after first run
  if [ -f ${OPTDIR}/conf/my.service.xml ]; then

    #allow direct connections from CrashPlan Desktop client on remote systems
    #you must edit the value of serviceHost in conf/ui.properties on the client you connect with
    #users report that this value is sometimes reset so now it's set every service startup 
    sed -i "s/<serviceHost>127\.0\.0\.1<\/serviceHost>/<serviceHost>0\.0\.0\.0<\/serviceHost>/" "${OPTDIR}/conf/my.service.xml"
    #default changed in CrashPlan 4.3
    sed -i "s/<serviceHost>localhost<\/serviceHost>/<serviceHost>0\.0\.0\.0<\/serviceHost>/" "${OPTDIR}/conf/my.service.xml"
    #since CrashPlan 4.4 another config file to allow remote console connections
    sed -i "s/127\.0\.0\.1/0\.0\.0\.0/" /var/lib/crashplan/.ui_info
     
    #this change is made only once in case you want to customize the friends' backup location
    if [ "${MANIFEST_PATH_SET}" != "True" ]; then

      #keep friends' backup data outside the application folder to make accidental deletion less likely 
      sed -i "s%<manifestPath>.*</manifestPath>%<manifestPath>${MANIFEST_FOLDER}/backupArchives/</manifestPath>%" "${OPTDIR}/conf/my.service.xml"
      echo "MANIFEST_PATH_SET=True" >> ${OPTDIR}/syno_package.vars
    fi

    #since CrashPlan version 3.5.3 the value javaMemoryHeapMax also needs setting to match that used in bin/run.conf
    sed -i -r "s%(<javaMemoryHeapMax>)[0-9]+[mM](</javaMemoryHeapMax>)%\1${JAVA_MAX_HEAP}m\2%" "${OPTDIR}/conf/my.service.xml"

    #make sure CrashPlan is not binding to the IPv6 stack
    grep "\-Djava\.net\.preferIPv4Stack=true" "${OPTDIR}/bin/${ENGINE_CFG}" > /dev/null \
     || sed -i -r "s/(^${CFG_PARAM}=\".*)\"$/\1 -Djava.net.preferIPv4Stack=true\"/" "${OPTDIR}/bin/${ENGINE_CFG}"
   else
    echo "Check the package log to ensure the package has started successfully, then stop and restart the package to allow desktop client connections." > "${SYNOPKG_TEMP_LOGFILE}"
  fi

  #increase the system-wide maximum number of open files from Synology default of 24466
  [ `cat /proc/sys/fs/file-max` -lt 65536 ] && echo "65536" > /proc/sys/fs/file-max

  #raise the maximum open file count from the Synology default of 1024 - thanks Casper K. for figuring this out
  #http://support.code42.com/Administrator/3.6_And_4.0/Troubleshooting/Too_Many_Open_Files
  ulimit -n 65536

  #ensure that Code 42 have not amended install.vars to force the use of their own (Intel) JRE
  if [ -e ${OPTDIR}/jre-syno ]; then
    JRE_PATH="`find ${OPTDIR}/jre-syno/ -name jre`"
    [ -z ${JRE_PATH} ] && JRE_PATH=${OPTDIR}/jre-syno
    sed -i -r "s|^(JAVACOMMON=).*$|\1\${JRE_PATH}/bin/java|" ${OPTDIR}/install.vars
    
    #if missing, set timezone and locale for dedicated JRE   
    if [ -z ${TZ} ]; then
      SYNO_TZ=`cat /etc/synoinfo.conf | grep timezone | cut -f2 -d'"'`
      #fix for DST time in DSM 5.2 thanks to MinimServer Syno package author
      [ -e /usr/share/zoneinfo/Timezone/synotztable.json ] \
       && SYNO_TZ=`jq ".${SYNO_TZ} | .nameInTZDB" /usr/share/zoneinfo/Timezone/synotztable.json | sed -e "s/\"//g"` \
       || SYNO_TZ=`grep "^${SYNO_TZ}" /usr/share/zoneinfo/Timezone/tzname | sed -e "s/^.*= //"`
      export TZ=${SYNO_TZ}
    fi
    [ -z ${LANG} ] && export LANG=en_US.utf8
    export CLASSPATH=.:${OPTDIR}/jre-syno/lib

  else
    sed -i -r "s|^(JAVACOMMON=).*$|\1\${JAVA_HOME}/bin/java|" ${OPTDIR}/install.vars
  fi

  source ${OPTDIR}/bin/run.conf
  source ${OPTDIR}/install.vars
  cd ${OPTDIR}
  $JAVACOMMON $SRV_JAVA_OPTS -classpath $FULL_CP com.backup42.service.CPService > ${OPTDIR}/log/engine_output.log 2> ${OPTDIR}/log/engine_error.log &
  if [ $! -gt 0 ]; then
    echo $! > $PID_FILE
    renice 19 $! > /dev/null
    if [ -z "${SYNOPKG_PKGDEST}" ]; then
      #script was manually invoked, need this to show status change in Package Center      
      [ -e ${PKG_FOLDER}/enabled ] || touch ${PKG_FOLDER}/enabled
    fi
  else
    echo "${DNAME} failed to start, check ${OPTDIR}/log/engine_error.log" > "${SYNOPKG_TEMP_LOGFILE}"
    echo "${DNAME} failed to start, check ${OPTDIR}/log/engine_error.log" >&2
    exit 1
  fi
}

stop_daemon ()
{
  echo "I ${TIMESTAMP} Stopping ${DNAME}" >> ${DLOG}
  kill `cat ${PID_FILE}`
  wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
  rm -f ${PID_FILE}
  if [ -z ${SYNOPKG_PKGDEST} ]; then
    #script was manually invoked, need this to show status change in Package Center
    [ -e ${PKG_FOLDER}/enabled ] && rm ${PKG_FOLDER}/enabled
  fi
  #backup identity file in case DSM upgrade removes it
  [ -e ${OPTDIR}/conf/var-backup ] || mkdir ${OPTDIR}/conf/var-backup 
  cp /var/lib/crashplan/.identity ${OPTDIR}/conf/var-backup/
}

daemon_status ()
{
  if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
    return
  fi
  rm -f ${PID_FILE}
  return 1
}

wait_for_status ()
{
  counter=$2
  while [ ${counter} -gt 0 ]; do
    daemon_status
    [ $? -eq $1 ] && return
    let counter=counter-1
    sleep 1
  done
  return 1
}


case $1 in
  start)
    if daemon_status; then
      echo ${DNAME} is already running with PID `cat ${PID_FILE}`
      exit 0
    else
      echo Starting ${DNAME} ...
      start_daemon
      exit $?
    fi
  ;;

  stop)
    if daemon_status; then
      echo Stopping ${DNAME} ...
      stop_daemon
      exit $?
    else
      echo ${DNAME} is not running
      exit 0
    fi
  ;;

  restart)
    stop_daemon
    start_daemon
    exit $?
  ;;

  status)
    if daemon_status; then
      echo ${DNAME} is running with PID `cat ${PID_FILE}`
      exit 0
    else
      echo ${DNAME} is not running
      exit 1
    fi
  ;;

  log)
    echo "${DLOG}"
    exit 0
  ;;

  *)
    echo "Usage: $0 {start|stop|status|restart}" >&2
    exit 1
  ;;

esac
 

install_uifile & upgrade_uifile

[
  {
    "step_title": "Client Version Selection",
    "items": [
      {
        "type": "singleselect",
        "desc": "Please select the CrashPlanPROe client version that is appropriate for your backup destination server:",
        "subitems": [
          {
            "key": "WIZARD_VER_480",
            "desc": "4.8.0",
            "defaultValue": true
          },
          {
            "key": "WIZARD_VER_470",
            "desc": "4.7.0",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_460",
            "desc": "4.6.0",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_452",
            "desc": "4.5.2",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_450",
            "desc": "4.5.0",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_441",
            "desc": "4.4.1",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_430",
            "desc": "4.3.0",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_420",
            "desc": "4.2.0",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_370",
            "desc": "3.7.0",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_364",
            "desc": "3.6.4",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_363",
            "desc": "3.6.3",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_3614",
            "desc": "3.6.1.4",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_353",
            "desc": "3.5.3",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_341",
            "desc": "3.4.1",
            "defaultValue": false
          },
          {
            "key": "WIZARD_VER_33",
            "desc": "3.3",
            "defaultValue": false
          }
        ]
      }
    ]
  },
  {
    "step_title": "Java Runtime Environment Selection",
    "items": [
      {
        "type": "singleselect",
        "desc": "Please select the Java version which you would like CrashPlan to use:",
        "subitems": [
          {
            "key": "WIZARD_JRE_SYS",
            "desc": "Default system Java version",
            "defaultValue": false
          },
          {
            "key": "WIZARD_JRE_CP",
            "desc": "Dedicated installation of Java 8",
            "defaultValue": true
          }
        ]
      }
    ]
  }
]
 

Changelog:

  • 0031 Added TCP 4242 to the firewall services (computer to computer connections)
  • 0044 21/Jan/17 – Updated dedicated Java version to 8 update 121
  • 0043 07/Jan/17 – Updated dedicated Java version to 8 update 111, added support for Intel Broadwell and Grantley CPUs
  • 0042 03/Oct/16 – Updated to CrashPlan 4.8.0, Java 8 is now required, added optional dedicated Java 8 Runtime instead of the default system one including 64bit Java support on 64 bit Intel CPUs to permit memory allocation larger than 4GB. Support for non-Intel platforms withdrawn owing to Code42’s reliance on proprietary native code library libc42archive.so
  • 0041 20/Jul/16 – Improved auto-upgrade compatibility (hopefully), added option to have CrashPlan use a dedicated Java 7 Runtime instead of the default system one, including 64bit Java support on 64 bit Intel CPUs to permit memory allocation larger than 4GB
  • 0040 25/May/16 – Added cpio to the path in the running context of start-stop-status.sh
  • 0039 25/May/16 – Updated to CrashPlan 4.7.0, at each launch forced the use of the system JRE over the CrashPlan bundled Intel one, added Maven build of JNA 4.1.0 for ARMv7 systems consistent with the version bundled with CrashPlan
  • 0038 27/Apr/16 – Updated to CrashPlan 4.6.0, and improved support for Code 42 pushed updates
  • 0037 21/Jan/16 – Updated to CrashPlan 4.5.2
  • 0036 14/Dec/15 – Updated to CrashPlan 4.5.0, separate firewall definitions for management client and for friends backup, added support for DS716+ and DS216play
  • 0035 06/Nov/15 – Fixed the update to 4.4.1_59, new installs now listen for remote connections after second startup (was broken from 4.4), updated client install documentation with more file locations and added a link to a new Code42 support doc
    EITHER completely remove and reinstall the package (which will require a rescan of the entire backup set) OR alternatively please delete all except for one of the failed upgrade numbered subfolders in /var/packages/CrashPlan/target/upgrade before upgrading. There will be one folder for each time CrashPlan tried and failed to start since Code42 pushed the update
  • 0034 04/Oct/15 – Updated to CrashPlan 4.4.1, bundled newer JNA native libraries to match those from Code42, PLEASE READ UPDATED BLOG POST INSTRUCTIONS FOR CLIENT INSTALL this version introduced yet another requirement for the client
  • 0033 12/Aug/15 – Fixed version 0032 client connection issue for fresh installs
  • 0032 12/Jul/15 – Updated to CrashPlan 4.3, PLEASE READ UPDATED BLOG POST INSTRUCTIONS FOR CLIENT INSTALL this version introduced an extra requirement, changed update repair to use the chrisnelson.ca method, forced CrashPlan to prefer IPv4 over IPv6 bindings, removed some legacy version migration scripting, updated main blog post documentation
  • 0031 20/May/15 – Updated to CrashPlan 4.2, cross compiled a newer cpio binary for some architectures which were segfaulting while unpacking main CrashPlan archive, added port 4242 to the firewall definition (friend backups), package is now signed with repository private key
  • 0030 16/Feb/15 – Fixed show-stopping issue with version 0029 for systems with more than one volume
  • 0029 21/Jan/15 – Updated to CrashPlan version 3.7.0, improved detection of temp folder (prevent use of /var/@tmp), added support for Annapurna Alpine AL514 CPU (armhf) in DS2015xs, added support for Marvell Armada 375 CPU (armhf) in DS215j, abandoned practical efforts to try to support Code42’s upgrade scripts, abandoned inotify support (realtime backup) on PowerPC after many failed attempts with self-built and pre-built jtux and jna libraries, back-merged older libffi support for old PowerPC binaries after it was removed in 0028 re-write
  • 0028 22/Oct/14 – Substantial re-write:
    Updated to CrashPlan version 3.6.4
    DSM 5.0 or newer is now required
    libjnidispatch.so taken from Debian JNA 3.2.7 package with dependency on newer libffi.so.6 (included in DSM 5.0)
    jna-3.2.5.jar emptied of irrelevant CPU architecture libs to reduce size
    Increased default max heap size from 512MB to 1GB on systems with more than 1GB RAM
    Intel CPUs no longer need the awkward glibc version-faking shim to enable inotify support (for real-time backup)
    Switched to using root account – no more adding account permissions for backup, package upgrades will no longer break this
    DSM Firewall application definition added
    Tested with DSM Task Scheduler to allow backups between certain times of day only, saving RAM when not in use
    Daemon init script now uses a proper PID file instead of Code42’s unreliable method of using grep on the output of ps
    Daemon init script can be run from the command line
    Removal of bash binary dependency now Code42’s CrashPlanEngine script is no longer used
    Removal of nice binary dependency, using BusyBox equivalent renice
    Unified ARMv5 and ARMv7 external binary package (armle)
    Added support for Mindspeed Comcerto 2000 CPU (comcerto2k – armhf) in DS414j
    Added support for Intel Atom C2538 (avoton) CPU in DS415+
    Added support to choose which version of CrashPlan PROe client to download, since some servers may still require legacy versions
    Switched to .tar.xz compression for native binaries to reduce web hosting footprint
  • 0027 20/Mar/14 – Fixed open file handle limit for very large backup sets (ulimit fix)
  • 0026 16/Feb/14 – Updated all CrashPlan clients to version 3.6.3, improved handling of Java temp files
  • 0025 30/Jan/14 – glibc version shim no longer used on Intel Synology models running DSM 5.0
  • 0024 30/Jan/14 – Updated to CrashPlan PROe 3.6.1.4 and added support for PowerPC 2010 Synology models running DSM 5.0
  • 0023 30/Jan/14 – Added support for Intel Atom Evansport and Armada XP CPUs in new DSx14 products
  • 0022 10/Jun/13 – Updated all CrashPlan client versions to 3.5.3, compiled native binary dependencies to add support for Armada 370 CPU (DS213j), start-stop-status.sh now updates the new javaMemoryHeapMax value in my.service.xml to the value defined in syno_package.vars
  • 0021 01/Mar/13 – Updated CrashPlan to version 3.5.2
  • 0020 21/Jan/13 – Fixes for DSM 4.2
  • 018 Updated CrashPlan PRO to version 3.4.1
  • 017 Updated CrashPlan and CrashPlan PROe to version 3.4.1, and improved in-app update handling
  • 016 Added support for Freescale QorIQ CPUs in some x13 series Synology models, and installer script now downloads native binaries separately to reduce repo hosting bandwidth, PowerQUICC PowerPC processors in previous Synology generations with older glibc versions are not supported
  • 015 Added support for easy scheduling via cron – see updated Notes section
  • 014 DSM 4.1 user profile permissions fix
  • 013 implemented update handling for future automatic updates from Code 42, and incremented CrashPlanPRO client to release version 3.2.1
  • 012 incremented CrashPlanPROe client to release version 3.3
  • 011 minor fix to allow a wildcard on the cpio archive name inside the main installer package (to fix CP PROe client since Code 42 Software had amended the cpio file version to 3.2.1.2)
  • 010 minor bug fix relating to daemon home directory path
  • 009 rewrote the scripts to be even easier to maintain and unified as much as possible with my imminent CrashPlan PROe server package, fixed a timezone bug (tightened regex matching), moved the script-amending logic from installer.sh to start-stop-status.sh with it now applying to all .sh scripts each startup so perhaps updates from Code42 might work in future, if wget fails to fetch the installer from Code42 the installer will look for the file in the public shared folder
  • 008 merged the 14 package scripts each (7 for ARM, 7 for Intel) for CP, CP PRO, & CP PROe – 42 scripts in total – down to just two! ARM & Intel are now supported by the same package, Intel synos now have working inotify support (Real-Time Backup) thanks to rwojo’s shim to pass the glibc version check, upgrade process now retains login, cache and log data (no more re-scanning), users can specify a persistent larger max heap size for very large backup sets
  • 007 fixed a bug that broke CrashPlan if the Java folder moved (if you changed version)
  • 006 installation now fails without User Home service enabled, fixed Daylight Saving Time support, automated replacing the ARM libffi.so symlink which is destroyed by DSM upgrades, stopped assuming the primary storage volume is /volume1, reset ownership on /var/lib/crashplan and the Friends backup location after installs and upgrades
  • 005 added warning to restart daemon after 1st run, and improved upgrade process again
  • 004 updated to CrashPlan 3.2.1 and improved package upgrade process, forced binding to 0.0.0.0 each startup
  • 003 fixed ownership of /volume1/crashplan folder
  • 002 updated to CrashPlan 3.2
  • 001 30/Jan/12 – intial public release
 
 
Advertisements

6,096 thoughts on “CrashPlan packages for Synology NAS

  1. Eamon

    I’m one of the unfortunates with a non-Intel Synology. I installed the older version on my DS213 and all seems fine at first however Crashplan automatically updates to V4.8 after a short while. Anybody know how to Block Crashplan upgrading from 4.7 on Synology and Windows client that I use to view activity?

    Thanks!

    Reply
    1. Dimi

      Can’t find the thread with my phone but search here and you will find it.

      In general what you need to do is rename the existing update folder to say update.tmp. Create a new one called update. Then do chmod 444 update so CP won’t be able to use that hence update will be blocked.

      Reply
      1. nicurda

        Eamon, Dimi,

        I took this approach (I own a 212j, non-intel) with no luck. Every time CrashPlan starts, it will try to download the latest version, which is expected.
        However, and since it won’t be able to do so, CP will wait 1 hour to try and download the update again but without starting the backup engine.

        If either one of you manage to make it work, can you post your steps here?
        Thanks,

        Nicolas

      2. Dimi

        What I did was the following (I have an Intel one so might be different)
        I installed the package from patters but did not start it after installation.
        Then I renamed the upgrade folder in /var/packages/CrashPlan/target/upgrade to /var/packages/CrashPlan/target/upgrade.tmp
        Then I created a file called update using sudo touch update
        Then I did
        sudo chmod 444 update
        Then I started the package. This has prevented CP from upgrading.
        Waiting for Patters to update the package.

      3. tam

        I have a 212j (non-intel) as well. I tried these steps and I’m having the same problem as you, with hourly failed attempts to upgrade and no backup running as far as I can tell. Were you ever able to get this to work?

        Even if it were to work, how do you manage your backups if it is on 4.7? My desktop client has already upgraded to 4.8 for my personal computer’s cloud backups.

      4. George

        Nicolas,
        I am backing up from clients to the NAS (not using Crashplan Central) and backup engine starts. Yes, I see the upgrade attempts, but when I start CP, backups execute on my clients. I shutdown CP (using cron) when backups are complete so CP does not continue to try an upgrade for the rest of the day. Awkward, but works for me.

    2. sadler

      I’m sorry but I don’t know how to start a new question so I hit reply.
      I use Crashplan on all my windows PC’s. I have just successfully set it up on this PC to backup my Synology 1515+ and I can see that the crashplan icon is check the selected NAS directories to back up to the cloud. However how can I be sure that my PC is still being backed up to Crashplan as the Crashplan tray icon is now referring to the NAS. Do I need to change the config file back? Which ones?
      Thanks for your help
      Suzanne

      Reply
      1. Dimi

        Hello Suzanne,
        So you had crashplan configured on your NAS and now you have CP installed on your Windows PC with mapped shared and you CP installation on your PC is supposed to backup these shares?
        I would suggest to uninstall CP from your NAS, uninstall CP from your PC and start again from the beginning.
        Hope this helps.

      2. sadler

        Hi Dimi,
        Thanks for your help. Somehow magic happened, I rebooted my PC and now I see that CP is running on both the PC and the NAS. So the instructions from PCLoadletter have been fantastic.
        Suzanne

  2. B. Goodman

    I sure hope Patters is OK! I don’t know if he’s ever gone so long after a new CP version without a single word, even if just to say he’s too busy to work on this now. Maybe after the holidays he’ll let us know at least he’s OK. He’s been fantastic to work on this for so many years.

    Merry Christmas to all and to all a good night!

    Reply
      1. B. Goodman

        Mine broke with the last CrashPlan update (early Nov, maybe?), but I followed some advice here and got it working again. I was just concerned about Patters’ silence and I hope everything is OK with him.

        Thanks, though, for your offer to help! Happy holidays!

  3. Kaci Agoun

    Just for info, I’ve been unable to connect to headless engine, which was running fine on the syno, checking listening service was also ok, I could connect from my PC but impossible to connect with the Crashplan client, I created the .ui_info in C:\Program Files\CrashPlan, nothing worked.
    Then I’ve seen that there was also a C:\ProgramData\CrashPlan with an existing .ui_info, and same files in ./conf. Editing those files allowed me to connect to the distant engine… just for info ;)
    This being said thanks for the nice package :D

    Reply
  4. Casper Olsen (@Casper_O)

    Hi, i have been using this for long of time,but recently the package did not want to update at all, so i uninstalled it (as i did many time before) – now i can’t find it in the community package list?

    I can fine find your JAVA and other packages but the packages for CrashPlan is gone? IS DS413 not supported anymore ?

    Reply
  5. arlensen

    I was playing yesterday again with crashplan on the synology.

    and it started to upgrade, so I applied the fix again.

    However, I am now unable to connect, I am using linux 4.7.0 client, but after chosing existing account, I get a message upgrading crashplan?

    does anybody know, how to prevent this? So I can configure it again?
    I can see from the crashplan logs on the synology, I am connecting, but how to prevent this upgrade attempt.
    I tried to google etc. and have been working on it for hours, but I am now kind of stuck….

    Reply
    1. Hugh

      I have the same situation on Ubuntu. The headless client connects to the Synology, prompts me for credentials, and then gets stuck with the “Upgrading CrashPlan” message.

      The ui_user.log.0 file indicates that the Synology-side service isn’t accepting connections while it tries to upgrade (CPErrors.Global.UPGRADING).

      #######################

      [01.13.17 10:13:55.723 INFO main backup42.desktop.view.MainWindow] *************************************************************************************
      [01.13.17 10:14:11.293 INFO main backup42.desktop.view.LoginPanel] LOGIN REQUEST: LoginRequestMessage[] LOGIN: username=xxx&yyy.com, password=****, serverAddress=null
      [01.13.17 10:14:15.406 INFO main backup42.desktop.view.LoginPanel] LOGIN RESPONSE: LoginResponseMessage@1427089775[ session=777746155999999, errors=[CPErrors.Global.UPGRADING : []] ]{}

      Reply
      1. arlensen

        Thx Hugh. Also no solution yet? I think i will move the mounted solution from Mac client

  6. ckrtech

    I have an ARM-based Synology, and I am still tapping my finger on my desk trying to figure out which direction to take. This situation is rather disappointing.

    Reply
  7. Hal Sandick

    I just got a update notification to update the crashplan package. does this mean that patters live? ;-)

    Reply
    1. Jon Etkins

      The Change Log now includes:
      0043 07/Jan/16 – Updated dedicated Java version to 8 update 111, added support for Intel Broadwell and Grantley CPUs.

      The date appears to be an error (should be 7/Jan/17), but it would seem that Patters is alive and coding!

      Reply
      1. Thor Egil Leirtrø

        Update went smooth, except I had to re-enter the encryption key.
        At the moment even the real-tme file system watch seems to work.

        DS412+ / DSM 6.0.2-8451 Update 7 / 2GB RAM / Default Java

  8. bertxl

    I’ve upgraded my crashplan on my synology NAS and it seemed to worked as usual. I’ve also updated the files in the conf folder on my client but after this, the this did not go as expected. After starting the client, crashplan client also installed an update.
    After the updated, I checked the UI.properties files and .ui_info in programdata and set them to the correct values. After restarting the client, things went wrong. It did not recognize the exiting backup and I inherited the previous backup. This also did not work correctly. My configuration looked correct, 4 backups referring to the correct folders but the first backup was renamed and when checking the underlying folders, they referred to my laptop and not to my NAS. This resulted in the status ‘missing’ when resynchronising the backup.
    I’ve created a ticket with Code42 but did not get a reaction yet.

    Reply
  9. Dimi

    I finally decided to upgrade CP and it all went well without any issues. I also applied the upgrade block fix in case CP decide to screw it up again.
    mv upgrade upgrade.tmp
    touch upgrade
    sudo chmod 444 upgrade
    But I am looking at other ways to backup as this CP saga is taking so much of my time and money as well… with the GBP slump CP is costing more.

    Reply
  10. ckrtech

    ARM user here. I have uninstalled and reinstalled CrashPlan to 4.7.0-0041 on the NAS. The two local computers that backup to it are running 4.8 and are synced with CrashPlan Central. After the reinstall of 4.7 on the NAS, the upgrade prevention via permissions, the token update, etc., I now have two “Diskstation” destination entries available – one is the original that states “No connection for 65.7 days” (The date of the 4.8 ARM snub). The second is the newly reinstalled Diskstation. It states “Destination unavailable – backup location is not accessible,” but I am definitely connected to it and the DiskStation also reports it is running (I stopped and restarted it at one point as well).

    Changing the ui.properties and .ui_info to the NAS IP and accessing the NAS setup via the CrashPlan UI, I have an adopt setting available at the top – but it times out trying to get a list of computers to adopt (I assume I can use this method to tell it that the current Diskstation is the same as the old Diskstation provided it doesn’t timeout).

    Can I either:
    1: Fix the destination unavailable issue, remove the original Diskstation computer entry and backup again
    2: Get the entries back down to one by doing an “adopt” (or something similar) and then backup the differences over the last 65+ days?

    I can go for either – I would just like it to work. I hope for the moment having two desktops running 4.8 and backing up to a NAS running 4.7 will work. Appreciate any suggestions.

    Reply
  11. Robert

    After overcoming all the upgrade issues, I think CrashPlan has finally beaten me. My DS1812+ now no longer has enough ram for CrashPlan to run, despite having 4GB ram. Crashplan suggests 1GB ram for each 1TB/1 million files. I have at least 10TB of data and I guess I’m lucky to have gotten 95% of my data uploaded. I don’t think I can set my java heap high enough to avoid the outofmemory errors. What would the highest possible heap setting be for a 4GB unit?

    I thought breaking up my backup into backup sets or staggering the backup schedules would help but CrashPlan support says that no matter what, the entire file manifest still need to be loaded into ram. I’ve turned off all services on my NAS and even tried disabling deduplication, compression, and encryption to try to reduce ram usage.

    So the amount of RAM a NAS supports is the limit of how much data you can have on the NAS (for CrashPlan’s purposes)? Anyone give up and install CrashPlan on a windows box, map a drive to the NAS, and adopt the backup? Would that even work given the differences between paths in each backup set?

    Reply
    1. davidjpatrick

      Hi, yes I did exactly that – I installed a Linux (Intel) box and called it the same name as my NAS – recreated the file structure with NFS mounts to the NAS shared folders. I did manage to adopt a backup OK and never had any issues with CP after that. I think the functionality is reduced in terms of realtime access to the file system. I’ve since changed to a QNAP NAS box with CP running fine. My backups are much smaller than yours about 1.5TB.

      Reply
      1. Robert

        Thanks for the tip! Using linux would be much easier to adopt the old backup than trying to do the same with Windows. I pieced together a linux system from spare parts and now it’s basically running in a cardboard box. Installed Ubuntu desktop, crashplan, connected to nas with nfs, and adopted the old backup. Currently using my TV as a monitor until everything is ok and I can make it headless.

        I hope 8GB ram is enough (double from nas, but I’m sure ubuntu is more bloated than the synology os) but at least I have the option to add more if needed. According to crashplan guidelines, I would need 12GB for my 12TB backup. We’ll see. I think many people will have the same issue once they start to max out the storage capacity of their NAS.

        Only unknown is how much storage crashplan will need for caching, so I went with a 40GB drive instead of trying to run ubuntu off a sdcard.

  12. Jon Etkins

    Today my Syno tell me that there’s an update available to the CrashPlan package. I’m already running the 4.8 package that Patters released last week, and I haven’t seen anything here about a newer version, and since it’s currently working just fine, I’m in no rush to update it!

    Reply
    1. Jon Etkins

      D’oh, I should have checked the change log before posting:
      “0044 21/Jan/17 – Updated dedicated Java version to 8 update 121”
      If that’s all there is then I think I’ll hold off, on the basis that if it’s working, don’t fix it!

      Reply
  13. David Laidlaw

    Thanks for the continuing package work on CrashPlan for Synology — it rocks.

    I am trying to understand the tradeoffs in installing the latest upgrade, 044, which says that it bumps java from v111 to v121. If the upgrade is a single button press, then I would go for it. If it’s like the last upgrade, which requires jumping through hoops, copying files and keys around, etc., then I would probably opt to wait for one where CrashPlan has to be updated to talk to CrashPlan Central. Any advice appreciated!

    Reply
    1. patters Post author

      It will require you to fetch the java file (if you want a dedicated Java 8 install just for CrashPlan) – e.g. if you need to also install Java 7 for some other package requirement.
      If you don’t need this, then don’t bother upgrading. There is no other change.

      Reply
  14. Torodd J. Rønning

    Hi, i have got 95% working (1513+ with last java 8u121) but when i open the client it only say “connecting to backup destination” – does anybody have any idea? I’m using win10.

    Reply
  15. tomwhelan

    I’m another ARM user, my 4.7 Crashplan was backing up happily until a week or so ago, then it upgraded itself and stopped. I blocked the upgrade, but backups failed to run. And the client updated itself automatically as well. So I bit the bullet and migrated from an ARM DS214 to an Intel DS 216+II. Migration from the old DS to the new DS went without a hitch, installing the new Java package and the Crashplan package went perfectly as well. Thanks, Patters!
    I’m stuck on the client configuration. The client began local backups from my Windows system without my asking it to, and when I log in and try to adopt the DS, the client doesn’t list it the DS for adoption,just local ones. I reset the .ui_info and ui.properties files to the new DS IP address and token, but that doesn’t fix it.
    I assume there is cached information I need to delete to clear the bogus local backup locations and find my DS backup information. Anybody know where to look?

    Reply
    1. tomwhelan

      After resetting the client configuration and restarting, the adoption list has changed.
      The first item is:
      Name Last backup
      Desktop 8 days ago 1.2TB @ Crashplan Central
      That’s the right size, but the name should be my Diskstation, but it doesn’t – it has my Windows system name. Any suggestions? Is there more client data to fix?

      Reply
  16. crookedview

    Having trouble with this package after not having used it for about a year. Updated via DSM package manager, using dedicated java binary in /volume1/public.

    Package manager says that CrashPlan is running, but netstat -pat | grep 4243 shows nothing, ps | grep java shows nothing, and /var/lib/crashplan doesn’t exist. /var/log/messages says:
    entry.cgi_SYNO.Core.Package.Installation[1].install[8620]: pkginstall.cpp:405 Failed to run preinst script for CrashPlan, [1]

    Any ideas?

    Reply
    1. crookedview

      Or is there a way to ensure that the package is completely uninstalled and there are no remnants that would be causing issues?

      Reply
      1. crookedview

        Just an update – I solved my problem by uninstalling the CrashPlan package and deleting the crashplah shared folders (I had two), then reinstalling the CrashPlan package.

    1. patters Post author

      I can verify this does not happen to me, and I also use the i586 version. I receive the file with the proper filename ejdk-8u121-linux-i586.tar.gz when I download using Firefox.

      Reply
  17. Martin

    DSM 6.1 is available. Just upgraded my 1513 and no issues so far. Crashplan started up ok, clients connect, etc.

    Not actually made the GUI connect to the backup engine, but that’s just laziness on my part.

    Reply
    1. Patrick

      CrashPlan is working fine on my DS916+ after upgrading to DSM 6.1 – including connecting to the backup engine with the GUI.

      Reply
    1. Greg

      Seeing the same issue here. I’ve been using Crasphplan as a backup destination without any issues but now want to backup some files on my Synology 1815+ to Crashplan. The crashplan client just sits there saying “connecting to backup destination” and never actually starts a backup.

      Reply
  18. ianmcshane

    I upgraded my DS415play to DSM 6.1 today, which broke the Crashplan 4.8.0-0044 client – just wouldn’t start.
    I uninstalled and reinstalled, but the CP client told me that the wrong version of Java was installed – I had both the Synology Java 7 and Java 8 packages. I removed 7.
    CP now told me that JAVA_HOME was undefined, so uninstalled and reinstalled Java 8.
    Voila, all working again.

    Reply
  19. ih800a

    Something odd has been happening for me over the past few weeks after upgrading the DSM (713+) and CrashPlan app. Each time the windows app runs, it crashes while or shortly after scanning for files. Then it won’t reconnect next time I start the app. When I ‘echo cat’, I get a different port number (4269, 4271, etc) and token value. I’ve uninstalled both the package and the app multiple times and reinstalled following these instructions. Thoughts?

    Reply
  20. Thor Egil Leirtrø

    Does anyone know how to get the “Watch file system in real-time” setting working? I am currently running the “Verify selection” on a daily basis to get everything backed up, but with close to 7TB of data it takes half the day to finish.

    DS412+ / 2GB RAM / DSM 6.1-15047 Update 1

    Reply
  21. Andy Fitter

    I just thought I’d add my latest story to the mix… After persevering with Crashplan on Synology/Xpenology for about 5 years now, I’ve finally given up. I moved to Synology Hyper Backup To Amazon Cloud. Same yearly price for unlimited backups ($59 or so) and so far, it has saturated my upstream continuously at 20Mbit doing the initial backup. Thats something that Crashplan only very rarely managed.

    Thanks for all your hard work in getting this working over the years.

    Reply
  22. Arlo Ihrig

    I’m trying to revive my DS212+ and CrashPlan, but the package isn’t showing up the community section of packages. I’ve got DSM 6.1-15047, with a MARVELL Kirkwood 88F6282 CPU.

    Am I just out of luck? Any chance this set up will work in the future?

    Reply
      1. David Shutt

        Is Crashplan & hence patters no longer supporting any marvell cpus?
        Just bought a DS216j to replace a long time broken DS212j & the package no longer appears to be available :-)

      2. patters Post author

        Unfortunately that is indeed the case. They introduced some proprietary binaries a while back which has limited CrashPlan to Intel CPUs only.

  23. Louie

    Just want to know CP whether it can support multiple client to be backup at the same time, or just one client at a time?!

    Reply
  24. Ronald

    Pathers thanks forf your work.
    But crashplan with Synology is a never ending story of problems.
    I use now hidrive with hyperbackup, and it works perecr

    Reply
  25. Nathan Eaton

    First, thanks for creating this. Long time user of Crashplan who moved to NAS after media server PC died.

    I have the ds216play with Monaco CPU. It doesn’t appear you have a version for that architecture. Any chance of adding support for it?

    Reply
  26. Martin

    Upgrade was downloaded 24th April. Several start attempts have all failed to get it running, but I haven’t the time at the moment to investigate further.

    Frustrating as I was beginning to think we were past this.

    Reply
    1. Hal Sandick

      same stopped. here is log:

      I 04/26/17 06:41 AM CrashPlan started, version 4.8.0, GUID [removed]
      I 04/26/17 06:41AM Stopping CrashPlan
      I 04/26/17 06:42AM CrashPlan started, version 4.8.0, GUID [removed]
      I 04/26/17 06:43AM Downloading a new version of CrashPlan.
      I 04/26/17 06:43AM Download of upgrade complete version 1436674800482.
      I 04/26/17 06:43AM Installing upgrade version 1436674800482
      I 04/26/17 06:43AM Upgrade installed version 1436674800482
      I 04/26/17 06:44AM Backup scheduled to always run
      I 04/26/17 06:44AM [Synology Backup] Scanning for files to back up
      I 04/26/17 06:44AM [Synology Backup] Scanning for files completed in 1 minute: 0 files (0MB) found
      I 04/26/17 06:44AM CrashPlan stopped, version 4.8.0, GUID [removed]
      I 04/26/17 06:45AM Synology extracting upgrade from
      /var/packages/CrashPlan/target/upgrade/1436674800482 4.jar

      Reply
      1. Dimi

        Just disable Crashplan updates. Search in here for steps and wait for patters to update the package. Or look for another solution. Which is what I’m doing. Once my Crashplan subscription expires I’m moving to HyperBackup locally and then sync to OneDrive. I happen to have unlimited OneDeive.
        Hope this helps.

    2. Martin

      Seems to have been a lack of cpio again.

      1. copied cpio to /usr/bin
      2. Uninstalled
      3. Reinstalled
      4. Restarted
      4. Connected client and logged in

      Now running 4.8.2, synchronising to CP Central and my laptop is backing up to the NAS.

      Reply
    1. Hal Sandick

      okay i tried this a few times and it did not work.

      – I then uninstalled crashplan and installed java 8 (instead of using the dedicated java).-
      – I installed crashplan and used default system java. it ran and then stopped — same issue as above:
      I 04/26/17 06:44AM CrashPlan stopped, version 4.8.0, GUID [removed]
      I 04/26/17 06:45AM Synology extracting upgrade from
      /var/packages/CrashPlan/target/upgrade/1436674800482 4.jar
      – i got the authentication token,
      – I restarted NAS
      – manually started crashplan and it is working (scanning for synchronization)

      Go figure

      hal

      Reply
  27. Yves Soers

    Received update on my 2 nas’s. One is running fine again after manually start. Second fails to start again.

    Anyone that can help me/us?

    Reply
  28. aadhoc78

    Had same problem (1436674800482).
    Got it fixed with cpio post from @Martin. Adding /bin/cpio fixed mine.

    Details of what I did:

    1) cp /volume1/@appstore/CrashPlan/bin/cpio /bin/cpio
    (though could do that after install if not starting service right after install)
    2) DSM CrashPlan Uninstall
    3) DSM CrashPlan Install (Default dedicated Java 8. Do not run after install)
    (/bin/cpio is in place right?)
    4) DSM CrashPlan Action->Run
    5) tail -f /var/packages/CrashPlan/target/log/service.log.0
    (Leave that tail running)
    6) Wait ~1min for: Waiting 60 seconds for upgrade script to shutdown service…
    7) Wait ~1min for: Service stopped normally
    8) DSM CrashPlan Action->Run, receive: “Failed to run the package service”
    9) Wait ~1min for: Enough time to do a good luck dance.
    10) DSM CrashPlan Action->Run
    11) Watch tail produce lots of output (including various warnings)
    12) Fix CrashPlan UI token
    echo `cat /var/lib/crashplan/.ui_info`
    (on client) vi /cygdrive/c/ProgramData/Crashplan/.ui_info
    13) Reconnect CrashPlan
    Start CrashPlan UI
    client: Existing Account
    Provide archive key, save
    Let scan for long time.

    Reply
  29. Wayne

    I’m not a script wiz, but it seems that maybe someone should write one for the updates using the steps that aadhoc78 did. That way, the future updates could easily be taken care of instead of loading patters install for each version that comes out. Thinking wrong here?

    Reply
    1. aadhoc78

      I’m not sure how @patters expects cpio, or where it comes from. The script did seem to look a few places for it before giving up. I suspect @patters will merely ensure that cpio is right and his script will be good again. His script deserves a lot of credit. I don’t know where most of his details & files come from.

      Reply
    1. aadhoc78

      You skipped the good luck dance, didn’t you.

      My issue seemed to be that cpio missing. I don’t know if there are other issues. BTW, I did the uninstall/reinstall several times before I got that combination to work (I didn’t see any harm in doing it a few times). If you do what I did (verifying that /bin/cpio is there before the install), then there’s a good chance it will work, but maybe you’ve got a different issue?!?

      Reply
  30. tomwhelan

    Thank you, aadhoc78 – your instructions worked for me. I didn’t have /bin/cpio in place.
    The package is running and synchronizing block information now, according to the client message.

    Reply
  31. Jon Etkins

    Interesting that this update managed to get around the “touch upgrade” workaround that I, and I’m sure many others, had in place. But after following the instructions from aadhoc78, I’m back up and running again. Thanks!

    Reply
  32. Wayne

    Hi all…

    I’m having a bad time trying to get the client to connect.

    The new ui_info is:
    4249,2b6516bf-411e-49b8-a310-xxxxxxxxxxxx,0.0.0.0

    So I put this in the client, with the NAS IP instead, but it will not connect. Am I missing something here?

    Thanks.

    Reply
  33. thezfunk

    When I try and run the command:
    cp /volume1/@appstore/CrashPlan/bin/cpio /bin/cpio
    I get permission denied and I am using the admin account.

    Reply
      1. thezfunk

        I think you are right but for some reason my admin password is being denied as the root password.

      2. Brad J.

        Starting with DSM 6 (or maybe 6.1?), you need to use “sudo -i” and then type your password (assuming you are an admin). This will then give you a shell with root access.

  34. adam

    Has anyone seen this error before:

    [05.01.17 10:37:35.053 INFO DefaultGroup .code42.messaging.peer.PeerGroup] PG::DefaultGroup RemotePeer not allowed to connect, missing PbK. RemotePeer-[guid=XXX]; PeerConnectionState-[state=DISCONNECTED, mode=PRIVATE, currentAddressIndex=0, layer=2/2(Peer::NIO), connecting=2017-05-01T09:36:58:345, connected=2017-05-01T09:36:58:346, disconnected=2017-05-01T09:36:58:352, attempts=0, connectActivity=2017-05-01T09:36:58:352, keepAliveSent=0, minRetry=26120, reconnectable, location=0.0.0.0:4242, transportPbK=null, transportPbKRequestable=false]; Session-null

    Crashplan 4.8.2 (displaying in package centre as 4.8.0-0044) Running on a synology DS1813+ running DSM 6.1.1-15101

    It has been running fine up until the 4.8.2 update. I’ve tried most of the suggestions above, plus the usual steps that i’ve done previously after updates.

    I’ve also un-installed and re-installed crashplan, java 8 (synology version) etc. But nothing seems to be working. I can’t connect to it with the client on my desktop either (after updating the ui GUID/Port)

    Any help would be greatly appreciated

    Cheers
    Adam

    Reply
  35. ZeusII

    OK, just did a quick fix and seems it worked. After doing this, CrashPlan was updated succesfully to 4.8.2 and started on first try on a DS713+ with DSM6.1.1!

    Just edit the “installer.sh” from the spk package replacing all the references to “4.8.0” with “4.8.2” and “480” to “482” and then install it manually through package manager (without uninstalling the previous version). You might also have to edit the file “INFO” upping the “version” field.

    Reply
    1. B. Goodman

      Would you elaborate on your fix, please? I’m trying to find installer.sh and coming up with nothing, even from a terminal session.

      Reply
      1. B. Good

        This link got me back in business

        https://idmedia.no/projects/xpenology/crashplan-4-8-2-released-failed-run/#comment-2970

        After following the instructions EXACTLY, CP started and started running. I did have to sign in, reenter my encryption key, and wait for things to sync again, but it all seems to be operational again.

        I noticed that several of my remote backup locations looked like they lost my backup set, but what appeared to be a new backup went to over 90 percent in about 15 minutes. So be patient!

      2. Shane

        What got me was the JAVAHASH. I had mine set to 4096 and looking at engine_error.log i saw:

        Invalid maximum heap size: -Xmx4096m
        The specified size exceeds the maximum representable size.
        Error: Could not create the Java Virtual Machine.
        Error: A fatal exception has occurred. Program will exit.

        So I chagned the heap size to 4095. Crashplan on my Synology started and is working.

  36. Ethan

    I got the Java installed and the package will start. But when I stop and then try to restart it, it will fail to restart, or only run for a few seconds. Any ideas?

    Reply
  37. DJ

    Team,

    I’ve had it with Crashplan on my Synology.
    With every update I have to troubleshoot so I want to:
    Move _from_ Crashplan running on my Synology _TO_ Crashplan running on a Windows computer.

    QUESTION: How can I do that without having to re-upload every file that’s already in the Crashplan Datacenter?

    Thank you!
    DJ

    Reply
    1. badbob001

      I haven’t tried going from linux (synology) to windows (scary), but I did successfully go from linux to linux. I had some old computer parts and basically threw them into a cardboard box, installed ubuntu from a usb flash, made a nfs mount to the synology volume using the exact same path as the original, installed crashplan, and it doesn’t suspect any change (did not have to adopt).

      I was limited to 4GB ram in my old synology but now I have 16GB in my linux box and so no more out of memory errors. I suspect synchronization is slower since it’s going over the LAN instead of SATA, but once that’s done, you’re back to being limited by Crashplan’s super slow uploads.

      Reply
      1. Monte

        I’ve tried to get crashplan running til I’m blue in the face. start stop uninstall reinstall….seems crazy. I’ve unistalled the Java version and reinstalled and have followed everyones methods on here. Nothing works. I’ve updated the .ui_info on my iMac . My crashplan on the package center is 4.8.0 -0044. I saw someone mention an newer version I think I saw 4.8.2. Where do you get that? Any help on this would be greatly appreciated. I’m 18 days without backup and not sure what to do. Would uninstalling completely from my iMac and reinstalling everything from scratch be the fix? Please Please help. I’m a novice and have learned a lot from this website. One thing I’ve never been able to find is all the cpio and jar files everyone is referencing. Maybe I don’t have permission on my imac to look at those, but I can’t find them to even try to edit them. Any help on that would be very helpful as well because I know there must be some mac users out ther that are doing this crazy stuff…….Patters…..help us!!!!! Please!!!!!
        Thank to everyone!!!!!

  38. Brad

    I just did the update and got things working again on two DS412+ boxes.

    Here are the steps, shamelessly cobbled together from suggestions from several other people.
    The key difference here is that you don’t have to uninstall and reinstall using these steps using a trick Patters posted a while ago (basically you trick the Package Manager into thinking you have an older version and then you can do an update even though you have the latest version). This means you don’t have to update your uuid in the client you use to connect in and don’t ever have to adopt, etc..

    4.8.2 Update steps:

    1) SSH in and use “sudo -i” to get root. Then “cp /volume1/@appstore/CrashPlan/bin/cpio /bin/cpio”
    2) “vi /var/packages/CrashPlan/INFO”. Lower package version number by one in that file, save and exit.
    3) Go to package center. It should let you update, or, should do so after a refresh.
    4) DSM CrashPlan Action->Run
    5) “tail -f /var/packages/CrashPlan/target/log/service.log.0” in the SSH window
    (Leave that tail running).
    6) Wait ~1min for: Waiting 60 seconds for upgrade script to shutdown service…
    7) Wait ~1min for the following in SSH/tail: Service stopped normally
    8) DSM CrashPlan Action->Run, receive: “Failed to run the package service”
    9) Wait ~1min for: Enough time to do a good luck dance.
    10) DSM CrashPlan Action->Run
    11) Watch tail produce lots of output (including various warnings)
    12) Reconnect CrashPlan client. You may need to re-enter your encryption key to start the backup process again.
    13) Let scan for long time.

    Hope this saves somebody some time!

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s