CrashPlan packages for Synology NAS

UPDATE – CrashPlan For Home (green branding) was retired by Code 42 Software on 22/08/2017. See migration notes below to find out how to transfer to CrashPlan for Small Business on Synology at the special discounted rate.

CrashPlan is a popular online backup solution which supports continuous syncing. With this your NAS can become even more resilient, particularly against the threat of ransomware.

There are now only two product versions:

  • Small Business: CrashPlan PRO (blue branding). Unlimited cloud backup subscription, $10 per device per month. Reporting via Admin Console. No peer-to-peer backups
  • Enterprise: CrashPlan PROe (black branding). Cloud backup subscription typically billed by storage usage, also available from third parties.

The instructions and notes on this page apply to both versions of the Synology package.

CrashPlanPRO-Windows

CrashPlan is a Java application which can be 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 several others. It has been through many versions since that time, as the changelog below shows. Although it used to work on Synology products with ARM and PowerPC CPUs, it unfortunately became Intel-only in October 2016 due to Code 42 Software adding a reliance on some proprietary libraries.

Licence compliance is another challenge – Code 42’s EULA prohibits redistribution. I had to make the Synology package use the regular CrashPlan for Linux download (after the end user agrees to the Code 42 EULA). I then had to write my own script to extract this archive and mimic the Code 42 installer behaviour, but without the interactive prompts of the original.

 

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, and an Intel CPU is required.
  • 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 8 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.
  • To install CrashPlan PRO you will first need to log into the Admin Console and download the Linux App from the App Download section and also place this in the ‘public’ shared folder on your NAS.
  • 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 or CrashPlan PRO app files recognised by this package, try downloading them with Firefox. It seems to be the only web browser that doesn’t try to uncompress the files, or rename them without warning. 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 will 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.
 

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.
  • The Linux CrashPlan PRO client must be downloaded from the Admin Console and placed in the ‘public’ folder on your NAS in order to successfully install the Synology package.
  • By default the client is configured to connect to the CrashPlan engine running on the local computer. 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.
    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 files:
    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)
    /var/lib/crashplan/.ui_info (Synology) – this value does change spontaneously if there’s a port conflict e.g. you started two versions of the package concurrently (CrashPlan and CrashPlan PRO)
  • 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

 

Migration from CrashPlan For Home to CrashPlan For Small Business (CrashPlan PRO)

  • Leave the regular green branded CrashPlan 4.8.3 Synology package installed.
  • Go through the online migration using the link in the email notification you received from Code 42 on 22/08/2017. This seems to trigger the CrashPlan client to begin an update to 4.9 which will fail. It will also migrate your account onto a CrashPlan PRO server. The web page is likely to stall on the Migrating step, but no matter. The process is meant to take you to the store but it seems to be quite flakey. If you see the store page with a $0.00 amount in the basket, this has correctly referred you for the introductory offer. Apparently the $9.99 price thereafter shown on that screen is a mistake and the correct price of $2.50 is shown on a later screen in the process I think. Enter your credit card details and check out if you can. If not, continue.
  • Log into the CrashPlan PRO Admin Console as per these instructions, and download the CrashPlan PRO 4.9 client for Linux, and the 4.9 client for your remote console computer. Ignore the red message in the bottom left of the Admin Console about registering, and do not sign up for the free trial. Preferably use Firefox for the Linux version download – most of the other web browsers will try to unpack the .tgz archive, which you do not want to happen.
  • Configure the CrashPlan PRO 4.9 client on your computer to connect to your Syno as per the usual instructions on this blog post.
  • Put the downloaded Linux CrashPlan PRO 4.9 client .tgz file in the ‘public’ shared folder on your NAS. The package will no longer download this automatically as it did in previous versions.
  • From the Community section of DSM Package Center, install the CrashPlan PRO 4.9 package concurrently with your existing CrashPlan 4.8.3 Syno package.
  • This will stop the CrashPlan package and automatically import its configuration. Notice that it will also backup your old CrashPlan .identity file and leave it in the ‘public’ shared folder, just in case something goes wrong.
  • Start the CrashPlan PRO Synology package, and connect your CrashPlan PRO console from your computer.
  • You should see your protected folders as usual. At first mine reported something like “insufficient device licences”, but the next time I started up it changed to “subscription expired”.
  • Uninstall the CrashPlan 4.8.3 Synology package, this is no longer required.
  • At this point if the store referral didn’t work in the second step, you need to sign into the Admin Console. While signed in, navigate to this link which I was given by Code 42 support. If it works, you should see a store page with some blue font text and a $0.00 basket value. If it didn’t work you will get bounced to the Consumer Next Steps webpage: “Important Changes to CrashPlan for Home” – the one with the video of the CEO explaining the situation. I had to do this a few times before it worked. Once the store referral link worked and I had confirmed my payment details my CrashPlan PRO client immediately started working. Enjoy!
 

Notes

  • The package uses the intact CrashPlan installer directly from Code 42 Software, following acceptance of its EULA. I am complying with the directive that no one redistributes it.
  • 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).
  • 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
    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.3_Linux.tgz"
[ "${SYNOPKG_PKGNAME}" == "CrashPlanPRO" ] && DOWNLOAD_FILE="CrashPlanPRO_4.*_Linux.tgz"
if [ "${SYNOPKG_PKGNAME}" == "CrashPlanPROe" ]; then
  CP_EXTRACTED_FOLDER="${SYNOPKG_PKGNAME}-install"
  OLD_JNA_NEEDED="true"
  [ "${WIZARD_VER_483}" == "true" ] && { CPPROE_VER="4.8.3"; CP_EXTRACTED_FOLDER="crashplan-install"; OLD_JNA_NEEDED="false"; }
  [ "${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"
[ "${SYNOPKG_DSM_ARCH}" == "rtd1296" ] && 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_151"
  #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-8u151-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-8u151-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-8u151-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-8u151-linux-i586.tar.gz"
    JAVA_BUILD="x86 Linux Small Footprint - Headless"
  elif [ "${SYNO_CPU_ARCH}" == "x64" ]; then
    JAVA_BINARY="jre-8u151-linux-x64.tar.gz"
    JAVA_BUILD="Linux x64"
    EXTRACTED_FOLDER="jre1.8.0_151"
    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

  #are we transitioning an existing CrashPlan account to CrashPlan For Small Business?
  if [ "${SYNOPKG_PKGNAME}" == "CrashPlanPRO" ]; then
    if [ -e /var/packages/CrashPlan/scripts/start-stop-status ]; then
      /var/packages/CrashPlan/scripts/start-stop-status stop
      cp /var/lib/crashplan/.identity ${PUBLIC_FOLDER}/crashplan-identity.bak
      cp -R /var/packages/CrashPlan/target/conf/ ${OPTDIR}/
    fi  
  fi

  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_483",
            "desc": "4.8.3",
            "defaultValue": true
          },          {
            "key": "WIZARD_VER_480",
            "desc": "4.8.0",
            "defaultValue": false
          },
          {
            "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)
  • 0047 30/Oct/17 – Updated dedicated Java version to 8 update 151, added support for additional Intel CPUs in x18 Synology products.
  • 0046 26/Aug/17 – Updated to CrashPlan PRO 4.9, added support for migration from CrashPlan For Home to CrashPlan For Small Business (CrashPlan PRO). Please read the Migration section on this page for instructions.
  • 0045 02/Aug/17 – Updated to CrashPlan 4.8.3, updated dedicated Java version to 8 update 144
  • 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
 
 

6,692 thoughts on “CrashPlan packages for Synology NAS

  1. Allen Wyma's avatarAllen Wyma

    Just got an update, yesterday. Seems to be the same as beber75. It says it upgraded, and the service can’t run cause it’s missing a jar:

    Finished removing user launcher files…
    Restarting Service
    Could not find JAR file /volume1/@appstore/CrashPlan/bin/../lib/com.backup42.desktop.jar
    Service Restart Complete

    Reply
  2. Troy's avatarTroy

    Crashplan pushed 1435813200470_317.jar today.

    I executed the following commands that have worked for the last few updates

    sudo 7z e -y /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar “*.jar” -o/var/packages/CrashPlan/target/lib/
    sudo 7z e -y /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar “lang/*” -o/var/packages/CrashPlan/target/lib/

    The .jar file is gone from the upgrade directory and the service will not start. an excerpt from the log file found in /volume1/@appstore/CrashPlan/log/upgrade.1435813200470_317.1462822696093.log

    currentDir=/volume1/@appstore/CrashPlan/upgrade/1435813200470_317.1462822696093
    upgrade.sh: line 214: cpio: command not found
    Removing existing app files…
    Adding updated files…
    32 bit version detected, using 32 bit electron.
    Replacing CrashPlanEngine
    ‘scripts/CrashPlanEngine’ -> ‘../../bin/CrashPlanEngine’
    Replacing run.conf
    ‘scripts/run.conf’ -> ‘../../bin/run.conf’
    Removing uninstall.sh
    removed ‘../../bin/uninstall.sh’
    Replacing root app launcher file…
    Replacing /usr/share/applications/crashplan.desktop with scripts/CrashPlan.desktop AS /usr/share/applications/crashplan.desktop…
    ‘scripts/CrashPlan.desktop’ -> ‘/usr/share/applications/crashplan.desktop’
    cp: cannot create regular file ‘/usr/share/applications/crashplan.desktop’: No such file or directory
    Finished removing user launcher files…
    Restarting Service
    Could not find JAR file /volume1/@appstore/CrashPlan/bin/../lib/com.backup42.desktop.jar
    Service Restart Complete

    Reply
    1. Lloyd's avatarLloyd

      @Troy, I had a similar problem, after the java update CrashPlan service won’t start on my DS1515+, did you find a successful workaround yet? I believe i tried all the upstream suggestions on this thread but they haven’t shown successful results.

      Reply
    2. badbob001's avatarbadbob001

      Is this new update even java based? I don’t see any jar files or a lang subfolder.

      admin@DS1812:/var/packages/CrashPlan/target$ sudo 7z l /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar

      Listing archive: /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar

      Path = /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar
      Type = zip
      Physical Size = 47456700

      Date Time Attr Size Compressed Name
      ——————- —– ———— ———— ————————
      2016-05-04 21:34:34 D…. 0 0 META-INF
      2016-05-04 21:34:32 ….. 103 90 META-INF/MANIFEST.MF
      2016-05-04 21:34:28 D…. 0 0 scripts
      2016-05-04 21:34:28 ….. 280 193 scripts/CrashPlan.desktop
      2016-05-04 21:34:28 ….. 544 314 scripts/CrashPlanDesktop
      2016-05-04 21:34:28 ….. 4831 1946 scripts/CrashPlanEngine
      2016-05-04 21:34:28 ….. 866 373 scripts/crashplan
      2016-05-04 21:34:28 ….. 527 191 scripts/run.conf
      2016-05-04 21:34:28 ….. 47472966 47448781 upgrade.cpi
      2016-05-04 21:34:32 ….. 273 174 upgrade.properties
      2016-05-04 21:34:32 ….. 10155 3410 upgrade.sh
      ——————- —– ———— ———— ————————
      47490545 47455472 9 files, 2 folders

      Reply
    3. oeekker's avataroeekker

      The new version 4.7.0 is packed inside a cpio file. You can extract it from the jar-file with “7z e 1435813200470_317.jar upgrade.cpio” and extract it with “cat upgrade.cpi | gzip -d -c – | cpio -i –no-preserve-owner”

      Reply
      1. badbob001's avatarbadbob001

        Looks like CrashPlan includes cpio in the latest failed update:
        /volumeX/@appstore/CrashPlan/bin/cpio
        Or maybe it was always there.

      2. badbob001's avatarbadbob001

        Thanks for the tip, oeekker:
        I have found upgrade.cpi in /volumeX/@appstore/CrashPlan/. For safety, I create a backup subfolder, copy upgrade.cpi there, and from that folder, run the following:
        cat upgrade.cpi | gzip -d -c — | ./../bin/cpio -i
        If I include the -no-preserve-owner, cpio would quit with ‘Mode already defined’.

        Anyway, the final output is. I think .so are linux binaries files so it does look like java is gone.
        -rw-rw-r– 1 admin users 7646107 May 11 09:16 app.asar
        drwxrwxr-x 2 admin users 4096 May 11 09:15 bin
        drwxrwxr-x 2 admin users 4096 May 11 09:15 conf
        drwxrwxr-x 2 admin users 4096 May 11 09:15 doc
        drwxrwxr-x 2 admin users 4096 May 11 09:15 lang
        drwxrwxr-x 2 admin users 4096 May 11 09:16 lib
        -rw-rw-r– 1 admin users 13060 May 11 09:16 libc42archive64.so
        -rw-rw-r– 1 admin users 11854 May 11 09:16 libc42archive.so
        -rw-rw-r– 1 admin users 2481278 May 11 09:16 libc42core.so
        -rw-rw-r– 1 admin users 48344 May 11 09:16 libjniwrap64.so
        -rw-rw-r– 1 admin users 24756 May 11 09:16 libjniwrap.so
        -rw-rw-r– 1 admin users 287934 May 11 09:16 libjtux64.so
        -rw-rw-r– 1 admin users 257693 May 11 09:16 libjtux.so
        -rw-rw-r– 1 admin users 427599 May 11 09:16 libleveldb64.so
        -rw-rw-r– 1 admin users 403970 May 11 09:16 libleveldb.so
        -rw-rw-r– 1 admin users 8417 May 11 09:16 libmd564.so
        -rw-rw-r– 1 admin users 7346 May 11 09:16 libmd5.so
        drwxrwxr-x 2 admin users 4096 May 11 09:16 log
        drwxrwxr-x 3 admin users 4096 May 11 09:16 skin
        drwxrwxr-x 3 admin users 4096 May 11 09:16 upgrade

      3. Troy's avatarTroy

        Guys,

        I’m confused by your instructions. Synology pushed a jre-7-linux-i586.tgz file into the root of the /volume1/@appstore/Crashplan directory and they pushed the 1435813200470_317.jar file along with a number of .sh script files into the /volume1/@appstore/Crashplan/upgrade directory. Mine was not packed inside a .cpio file. so it seems your commands above aren’t necessary? The original sudo 7z commands below work on the .jar file but as I pasted my log above, there are other issues going on with this 470_317 upgrade that leave CrashPlan totally unable to start.I don’t get in the log below why it says upgrade.sh: line 214 cpio: command not found when the .jar file isn’t a CPIO archive and further there is a cpio binary located in /volume1/@appstore/Crashplan/bin.

        Patters? Help!! :)

        currentDir=/volume1/@appstore/CrashPlan/upgrade/1435813200470_317.1462822696093
        upgrade.sh: line 214: cpio: command not found
        Removing existing app files…
        Adding updated files…
        32 bit version detected, using 32 bit electron.
        Replacing CrashPlanEngine
        ‘scripts/CrashPlanEngine’ -> ‘../../bin/CrashPlanEngine’
        Replacing run.conf
        ‘scripts/run.conf’ -> ‘../../bin/run.conf’
        Removing uninstall.sh
        removed ‘../../bin/uninstall.sh’
        Replacing root app launcher file…
        Replacing /usr/share/applications/crashplan.desktop with scripts/CrashPlan.desktop AS /usr/share/applications/crashplan.desktop…
        ‘scripts/CrashPlan.desktop’ -> ‘/usr/share/applications/crashplan.desktop’
        cp: cannot create regular file ‘/usr/share/applications/crashplan.desktop’: No such file or directory
        Finished removing user launcher files…
        Restarting Service
        Could not find JAR file /volume1/@appstore/CrashPlan/bin/../lib/com.backup42.desktop.jar
        Service Restart Complete

      4. andylarubin's avatarandylarubin

        I apparently made CrashPlan working again on my DS414 after the upgrade to 1435813200470. Here’s what I did:

        1) Got rid of incorrect JRE inside /var/packages/CrashPlan/target, linked a correct one (in my case from Synology Java 7 package):

        cd /var/packages/CrashPlan/target
        sudo mv jre jre-7-linux-i586
        sudo ln -s /volume1/@appstore/Java7/j2sdk-image/jre jre

        2) Unpacked upgrade.cpi over the /var/packages/CrashPlan/target:

        cat upgrade.cpi | gzip -d -c – | sudo bin/cpio -i –no-preserve-owner

        3) Restarted the service.

  3. CraigJ's avatarCraigJ

    Same issue for me – the new update ran on its own and trashed the lib and lang folders (possibly others). The jar file is packaged quite a bit differently – most of the files are contained in a file that needs to be expanded using “cpio”, which doesn’t exist on the NAS. The other errors in the log seem to point towards the crashplan desktop app, but I don’t think we really care about that.

    If cpio was working, I suspect the upgrade would complete successfully. Anyone with a bit more experience know how to add it?

    Reply
  4. Karl G's avatarKarl G

    well, CrashPlan 4.7.0 autopushed today to my Synology and everything got botched. This time it looks like they’re distributing via cpio arrive now? Is this new? the sinology OS does not have cpio installed, so you need another computer to convert to a tarball.

    (roughly) here’s what I did to get things back up. Note I *just* started the service and now it’s reindexing, so no bets on if it actually will back any thing up.

    * grab the install.cpi from the CrashPlan target directory
    * scp to my mac in a new folder
    * extract with: cat install.cpi | cpio -vi
    * tar back up: tar -cvf ../install.tar ./
    * scp back to the Sinology (in /tmp)
    * cd to the /var/packages/CrashPlan/target/upgrade directory, run: sudo tar -xvf /tmp/install.tar
    * sudo mv libs*.so ../
    * sudo mv lib ../
    * sudo mv lang ../
    * sudo mv doc ../
    * sudo rsync -av skin/ ../skin/
    * cd ../bin
    * sudo mv java java-stock
    * sudo ln -s /var/packages/Java7/target/j2sdk-image/bin/java
    * cd ../lib
    * fix the jna.jar as described before
    * start CrashPlan

    with any luck, you should be good to go

    Reply
  5. Troy's avatarTroy

    I’ve tried everything with this new update and nothing seems to work. I deinstalled Patter’s 4.6.0 package and moved to the Java8 package. Java installed fine, then I tried to start CrashPlan. It grabbed the 1435813200470_317.jar again. I made a copy because the upgrade process tries to delete the .jar after it tries to upgrade. This way I can keep trying. It leaves a bunch of .sh files in the install directory. I removed those and tried to restart after manually doing the sudo 7e commands but nothing seems to work. It seems CrashPlan pushed jre-7-linux-i586.tgz as part of this upgrade and in the log file it shows the following:

    jre/man/ja_JP.UTF-8/man1/pack200.1
    jre/man/ja_JP.UTF-8/man1/javaws.1
    jre/man/ja_JP.UTF-8/man1/orbd.1
    jre/man/ja_JP.UTF-8/man1/rmid.1
    jre/man/ja_JP.UTF-8/man1/keytool.1
    jre/man/ja_JP.UTF-8/man1/tnameserv.1
    jre/man/ja_JP.UTF-8/man1/rmiregistry.1
    jre/man/ja_JP.UTF-8/man1/policytool.1
    Java Installed.
    Unpacking remaining upgrade files
    currentDir=/volume1/@appstore/CrashPlan/upgrade/1435813200470_317.1462852219240
    upgrade.sh: line 214: cpio: command not found
    Removing existing app files…
    Adding updated files…
    32 bit version detected, using 32 bit electron.
    Replacing CrashPlanEngine
    ‘scripts/CrashPlanEngine’ -> ‘../../bin/CrashPlanEngine’
    Replacing run.conf
    ‘scripts/run.conf’ -> ‘../../bin/run.conf’
    Removing uninstall.sh
    removed ‘../../bin/uninstall.sh’
    Replacing root app launcher file…
    Replacing /usr/share/applications/crashplan.desktop with scripts/CrashPlan.desktop AS /usr/share/applications/crashplan.desktop…
    ‘scripts/CrashPlan.desktop’ -> ‘/usr/share/applications/crashplan.desktop’
    cp: cannot create regular file ‘/usr/share/applications/crashplan.desktop’: No such file or directory
    Finished removing user launcher files…
    Restarting Service
    Could not find JAR file /volume1/@appstore/CrashPlan/bin/../lib/com.backup42.desktop.jar
    Service Restart Complete

    Reply
      1. Kevin's avatarKevin

        Here is a copy of the log where things seem to go wrong:

        Java Installed.
        Unpacking remaining upgrade files
        currentDir=/volume1/@appstore/CrashPlan/upgrade/1435813200470_317.1462873581688
        upgrade.sh: line 214: cpio: command not found
        Removing existing app files…
        Adding updated files…
        32 bit version detected, using 32 bit electron.
        Replacing CrashPlanEngine
        ‘scripts/CrashPlanEngine’ -> ‘../../bin/CrashPlanEngine’
        Replacing run.conf
        ‘scripts/run.conf’ -> ‘../../bin/run.conf’
        Removing uninstall.sh
        removed ‘../../bin/uninstall.sh’
        Replacing root app launcher file…
        Replacing /usr/share/applications/crashplan.desktop with scripts/CrashPlan.desktop AS /usr/share/applications/crashplan.desktop…
        ‘scripts/CrashPlan.desktop’ -> ‘/usr/share/applications/crashplan.desktop’
        cp: cannot create regular file ‘/usr/share/applications/crashplan.desktop’: No such file or directory
        Finished removing user launcher files…
        Restarting Service
        Could not find JAR file /volume1/@appstore/CrashPlan/bin/../lib/com.backup42.desktop.jar
        Service Restart Complete

    1. Gert Serneels's avatarGert Serneels

      Hello,

      I just upgraded Crashplan succesfully to version 4.7.0, it’s synchronizing file information now, everything looks okay at the moment. But what did I do to make it work? It was not so complicated…

      The problem was that the upgrade script did not find the cpio command, so I copied it from /var/packages/CrashPlan/target/bin to /bin.
      > cp /var/packages/CrashPlan/target/bin/cpio /bin/cpio

      Now reinstall the latest package from Patters. When it’s succesfully started, after a few seconds or minutes the 4.7.0 upgrade downloads. The upgrade process starts and after a while the package stops.

      Now check the /var/packages/CrashPlan/target/install.vars file that the JAVACOMMON variable is pointing to the correct java installation. I installed the Synlogy Java 8 package, so the setting on my installation is:
      > JAVACOMMON=/volume1/@appstore/Java8/j2sdk-image/jre/bin/java

      Start the package manually, you will receive an error, but the script extracts the jar file (Synology extracting upgrade from /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar). Just start the package one more time, after a while I got the message “Crashplan started, version 4.7.0”.

      Gert

      Reply
      1. badbob001's avatarbadbob001

        I also copied the cpio to the /bin folder but instead of reinstalling (which I’m always afraid of), I ran the following in the /var/packages/CrashPlan/target/ folder:
        sudo cat upgrade.cpi | gzip -d -c — | /volume2/@appstore/CrashPlan/bin/cpio -i

        cpio had some warnings:
        /volume2/@appstore/CrashPlan/bin/cpio: bin: Cannot change mode to rwxrwxr-x: Operation not permitted
        /volume2/@appstore/CrashPlan/bin/cpio: bin/restartLinux.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: conf: Cannot change mode to rwxrwxr-x: Operation not permitted
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/custom_sample.properties: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/default.service.xml: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/service.log.xml: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/ui.log.xml: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/ui.properties: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/upgradeui.log.xml: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current conf/upgradeui.properties: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: skin: Cannot change mode to rwxrwxr-x: Operation not permitted
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/icon_app_128x128.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/icon_app_16x16.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/icon_app_32x32.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/icon_app_64x64.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/logo_main.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/skin.properties: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/splash_default.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/splash_plus.png: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current skin/window_bg.jpg: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: skin/custom: Cannot change mode to rwxrwxr-x: Operation not permitted
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade: Cannot change mode to rwxrwxr-x: Operation not permitted
        /volume2/@appstore/CrashPlan/bin/cpio: cannot remove current upgrade/start.bat: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/start.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/startDesktop.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/startDesktopLinux.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/startDesktopSolaris.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/startFirst.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/startLinux.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/startSolaris.sh not created: newer or same age version exists
        /volume2/@appstore/CrashPlan/bin/cpio: upgrade/UpgradeUI: Cannot mkdir: Permission denied
        /volume2/@appstore/CrashPlan/bin/cpio: log: Cannot change mode to rwxrwxr-x: Operation not permitted
        120512 blocks

        But crashplan was now startable from package manager. Not really sure how to get around the permission denied warnings. I did use sudo. Perhaps I need to “sudo /bin/sh” and then run the extraction from there?

      2. Tom K.'s avatarTom K.

        Thanks for the assist. I used a symbolic link vs a copy on the CPIO; but I’m back and running on both stations.

  6. Karl Grindley (@karlg100)'s avatarKarl Grindley (@karlg100)

    I have mine working (so far) without issue with 4.7. A few comments.
    * don’t upgrade to java 8. They shipped java 7 with 4.7, I would recommend sticking with the same version that Code42 ships with Crashplan.
    * you will need to do the usual massaging to get this to work. you don’t need to delete the old package. (actually, you’ll need your old configs, do a restore from crash plan to get your old configs back)
    * if you have’t deleted the package/configs, I’d recommend cutting a tarball snapshot before you attempt an upgrade : sudo tar -cvpf $HOME/crashplan-4.7-broken.tar /var/packages/CrashPlan /var/packages/CrashPlan/target

    * once you have that done, try this for reinstalling manually. First, for whatever reason, they shipped the upgrade as a CPIO archive that isn’t compatible with the cpio binary on DSM6. this may be what caused it to fail the upgrade, not sure. I took the cpio archive to my Mac, extracted, and repackaged to a tarball. (guessing this could be an endian issue?)
    * scp to a linux box or your mac the /var/packages/CrashPlan/target/upgrade.cpi file to /tmp
    * on your mac: create a temp directory : mkdir /tmp/upgrade
    * on your mac: cd /tmp/upgrade
    * on your mac: and extract : cat /tmp/upgrade.cpi | cpio -vi
    * on your mac: repackage as a tarball : tar -cvf /tmp/upgrade.tar ./
    * scp /tmp/upgrade.tar back to the synology to /tmp
    * back on the synology…
    * cd /var/packages/CrashPlan/target/upgrade
    * sudo tar -xvf /tmp/upgrade.tar
    * move the stuff you need into the target directory…
    * sudo mv lib*.so ../
    * sudo mv lib ../
    * sudo mv lang ../
    * sudo mv doc ../
    * sudo rsync -av skin/ ../skin/
    * fix the usual jna.jar issue…
    * cd ../lib
    * sudo mv jna.jar jna.jar-orig
    * sudo curl -O https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar
    * sudo ln -s jna-4.2.2.jar jna.jar
    * relink java 7 binary to the arm version you already have installed
    * cd ../jre/bin
    * sudo ln -s /var/packages/Java7/target/j2sdk-image/bin/java
    * restart crash plan from the DSM package manager

    with any luck, you’re back up and running. I have left dedulplcation disabled so I can get some good performance out of my arm synology.

    Reply
  7. karlg100's avatarkarlg100

    well, I’ve got 4.7 working on my synology. (and it seems to be far faster, but I just recently disabled de-duplication and compression, and a .5 TB backup job finished super quick) I have a rough procedure I’ve posted, but wordpress flagged it for moderation. hopefully they post it soon.

    Reply
      1. wittgenfrog's avatarwittgenfrog

        Broken here too with much the same logs as above.
        I’m a bit green with LINUX, so any help much appreciated!

        ——————————————————
        DS415Play
        DSM 6.x

  8. wbvreeuwijk's avatarwbvreeuwijk

    I ran into the same problem. I found that the upgrade.cpi file needs to be uncpio-ed. This fails (error: cpio: command not found).
    There is an cpio in the /var/packages/CrashPlan/target/bin directory, so I copied this to /usr/local/bin. This appears to work for me.

    I’m on a DS1515+.

    Reply
  9. Hauke's avatarHauke

    Same Problem here… update fails on DS1515+
    Latest DSM 6 and latest Crashplan… I tried all Java variants….
    The java the update pushes is simply the wrong version…

    Reply
  10. Jeff's avatarJeff

    re: DS216j
    CrashPlan 4.6.0 runs, but then stops after installing upgrade version 1435813200470.
    How do I stop the upgrade process? Thanks.

    Reply
      1. Thor Egil Leirtrø's avatarThor Egil Leirtrø

        The omly map point I have is /volume1. Adding more map points on lower levels would result in backup starting from scratch again. I would like to avoid uploading 4TB one more time.

  11. aurelialabert's avataraurelialabert

    I apologise for repeating here a previous question. Just one more time, I promise. I cannot even start pairing client and server:
    ————————

    I have a more basic problem: There is no such file as /var/lib/crashplan/.ui_info in my installation. There is only one file, called .identity in that directory. Moreover, the Crashplan package stops after one minute or so after starting. This is my enviroment:

    Synology DS115j
    CPU: MARVELL Armada 370 88F6707
    RAM 256 MB
    OS: DSM 6.0-7321 Update 3
    Java SE Embedded 8 version 1.8.0_91-0039

    I tried to uninstall and reinstall the package, but the situation is the same. I am not able to find any information that could help me. Does anyone have an idea?

    Reply
  12. cjamieso's avatarcjamieso

    Possible solution that has crashplan back up and running for me.

    If you look closely at the upgrade log you’ll see: upgrade.sh: line 214: cpio: command not found
    This command is what unpacks the crashplan files and moves them into your local folder. They’re actually packaged in a second archive (upgrade.cpi), rather than at the top level like before.

    Fortunately, patters has already included the binary for this for us – his install script depends on it. All we need to do is copy that file into our system PATH and the upgrade will complete successfully.

    The method that I used:
    Remove the package
    Re-Install the package
    ssh into your diskstation
    cd /var/packages/CrashPlan/target/bin (you’ll find the cpio executable here)
    copy it to your system path: sudo cp -a cpio /usr/bin (-a preserves permissions, which you might need since it needs to be executable)
    test it out: type “cpio” and you should get a prompt letting you know you can type ‘cpio –help’ or ‘cpio –usage’ for more info (if you see “command not found” then it’s not in your path)

    While you were doing that, your diskstation was trying to install the upgrade again and failed since it likely did it before you copied the ‘cpio’ file.

    Remove the package again
    Re-Install the package
    Wait a little bit -> the update is being downloaded and installed
    In the /var/packages/CrashPlan/target/upgrade directory, you’ll see another directory with a bunch of numbers while it’s installing, but it will disappear when it’s done. Alternatively, you can check the upgrade log file to see if it’s done (in /var/packages/CrashPlan/target/log)

    Start the CrashPlan package from the DSM web interface – this will fail as it will find the ‘1435813200470_317.jar’ file and remove it. You could probably delete it on your own, but I didn’t check.

    Start the CrashPlan package again – this time it should start up.

    I had to re-grab the ID from /var/lib/crashplan/.ui_info, but otherwise it seems OK. Currently mine is synchronizing block information.

    NOTE: I am working with an Intel-based CPU so I haven’t had to change any java directives. If you’ve had to change these in the past, you’ll likely have to change them as you did previously before it will work. They seem to be trying to package their own version of java crashplan now, which is probably why they are claiming they will no longer support some devices.

    Hopefully someone a little smarter than me can comment on whether it’s save to copy the ‘cpio’ file to /usr/bin or if there’s a better location or if perhaps it’s best to just edit the path.

    Reply
  13. beber75's avatarbeber75

    @Thor Egil Leirtrø
    Sorry, I have no reply button shown in my web page.

    Once you are connected with your Crashplan client, you’ll have to click on the opt option (to transfer your current backup to this one).
    Here is what I did:

    I’ve mapped all my backup folders as it was before without docker:

    /volume1/Archives
    /volume1/homes
    and so on

    The point is to reproduce the same directory entry points that was previously backed up.
    Doing it like that, when you’ll click on the opt otion you’ll have a message warning you that the previous computer will stop backing up and backupo plan will be transfered to this computer.

    I did that and currently I only have to synchronise 220 Go (I had already saved 2.8 To)

    Regards

    Reply
    1. Thor Egil Leirtrø's avatarThor Egil Leirtrø

      Yes, seems you were right. Now the amount of files seems right. But now CP crashes every 4-5 minutes, restarts scanning from start, and never gets to the point of doing any backups.
      Doesn’t work for me.

      Reply
      1. beber75's avatarbeber75

        Sorry for you.

        On my side it works since 2 days and is still backing up.

        For your information I had some problems on my side too but before migrating to docker.
        My problems where related to available ram on synology. I had a 2go version (DS1813+). Since I’ve added a 2go additional ram to my synology it’s better (Now I have a total of 4 Go).
        My Crashplan docker is regularly using more than 1 Go of ram and I was swapping on the synology (before the memory upgrade).

        Maybe you could try to limit the amount of ram available to your docker session and see if it’s working.

        Regards

  14. Luca Merega's avatarLuca

    I am afraid we are going to move to some different backup solution :-(
    Do you know if there is somethins with the same features? Unlimited space, restore from web, unlimited retention, etc. etc.?

    Reply
    1. davidjpatrickavid Patrick's avatardavidjpatrickavid Patrick

      I started to have a look at some of the other Synology backup options such as S3 and Glacier but never once did I get a successful backup – with each of them both failed to backup at different points. You need to be careful with the pricing as storage may be cheap (not as cheap as Crashplan though) the fetch fees can be quite high – again – it depends on your usage. I looked at HiDrive but the functionality or price could not match Crashplan – I have 1.2TB to backup.
      For now I’m sticking with an Intel-based external Linux machine with NFS mount points running Crashplan Linux-native app. I realise I loose some of the realtime options but Crashplan is only there as a secondary offsite option and mount points do not change.
      If you do find anything on your travels please let me know.

      Reply
    2. DirkG's avatarDirkG

      I am moving to iDrive. Not so fancy as Crashplan but they have a Synology client. It works fine for me with much less load on the Syno. Price is the same as Crashplan but limited to 1 Tb.
      If you start with a free trial, you will get an offer to buy a first year with 70% discount :-)
      I have 9 days left to decide if I will buy another year @Crashplan but I think I will stop.

      Reply
  15. Yves Soers's avatarYves Soers

    I have a problem with my setup since 09/05/16.
    The logs show these entrees:
    – 05/09/16 downloading new version of Crashplan.
    – 05/09/16 download completed – version 1435813200470
    – 05/09/16 busy with installing of upgrade – version 1435813200470
    – 05/09/16 upgrade installed – version 1435813200470
    – 05/09/16 Crashplan stopped – version 4.6.0

    Tried to restart today
    – Synology extracting upgrade from /car/packages/CrashPlan/target/upgrade/1435813200470_317.jar

    Restart didn’t work, new restart doesn’t work either and no new logs since then.
    Also tried the upgrade instruction as before, but no luck.

    Anyone that can help mee?

    Reply
      1. Monte Moore's avatarMonte Moore

        Can you give me any insight on why my Java 8 SE keeps reading “Java failed to install be cause I was expecting to find…..” I then went to oracle downloaded the correct file for my unit. Agreed to the EULA…. etc. restarted my synology NAS. Seems like I’ve done everything I know how to do. I can’t figure out why it won’t load the Java program. I was home today thinking I’d try to get crashplan running again on the NAS since it hasn’t been working after the update six days ago. Any other instructions or ideas would be very helpful
        Thanks,
        Monte

      2. stephanthierry's avatarstephanthierry

        I’m currently running 4.7 on both the NAS (DS214se) and on the clientside. Everything is running. I can connect and it seems to work. But the backup just never starts. It’s stuck on the “Waiting for backup. To do: 0 files (0 MB)” message. The backupset is about 667 GB – and in “Connection status” it says “CrashPlan Cental: Connected for 28 minutes” – so it makes no sense.

        Any ideas?

      3. ianmdouglass's avatarianmdouglass

        I had the exact same issue, but I remembered I needed to update the jna.jar file from Patters version… to do that, follow these steps:

        0 – Download new jna.jar file -> https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar

        1 – go to /var/packages/CrashPlan/target/bin and make a backup from jna.jar ( mv jna.jar jna.backup )
        2 – Rename the downloaded jna-4.2.2.jar to jna.jar
        3 – Copy the jna.jar you downloaded to the /var/packages/CrashPlan/target/bin directory
        4 – Start Crashplan package in Synology
        5 – Open the crashplan client (PC) to check the sync and it should be working…
        check /var/packages/crashplan/.ui_info for a new guid when you can’t connect.

        I didn’t know how to copy a file from windows to synology via the cmd prompt, so I put together a short guide on that which references a youtube video… take a look and hope it’s helpful for those that need it.

        Open cmd.exe
        Change directory to where pscp.exe is found to facilitate transfer. https://www.youtube.com/watch?v=bJbBpOptMjA

        Cd C:\Program Files (x86)\PuTTY\

        Then enter the following text “pscp.exe C:\Users\[USERNAME]\Desktop\jna.jar root@1.1.1.1:/var/packages/CrashPlan/target/bin” and press enter to execute the transfer (will need to enter password for root on synology

      4. Sascha (@sash224)'s avatarSascha (@sash224)

        I’ve had the same behaviour on my DS214+. Needed to switch to the “jna.jar” file in version 4.2.2 (you’ll find the link and instructions somewhere in this thread), now it works for me.

  16. badbob001's avatarbadbob001

    After I got crashplan working again on 4.7 (extracted the cpi file manually), backups are not working due to constant re-sychronizing, which sounds like a memory issue (I have 10+TB of files but split into 26 backup sets). My ds1812 has 4GB of ram and I had set the heap to 3072M a LONG time ago.

    But when I check /volumeX/@appstore/CrashPlan/syno_package.vars, it only contained:
    MANIFEST_PATH_SET=True

    My memory if foggy, but I think I had originally set the memory size in syno_package.vars. In any case, I added back USR_MAX_HEAP=3072M and restarted crashplan. I hope this works. Did it happen to anyone else?

    Reply
    1. Tom K.'s avatarTom K.

      This happened to me as well. I re-entered the information and then restarted (You can also update the file and make a command line entry in the app as well if you prefer avoiding a restart).

      Reply
  17. Ole Overgaard's avatarOle Overgaard

    Patters, can you help here?

    Today crashplan on my Synology had stopped. I upgraded Java and then upgraded Crashplan to 4.6.0. However it does not work.

    When starting it, it stops and the log file shows:
    I 05/12/16 08:46PM CrashPlan started, version 4.6.0, GUID 651660719697690647
    I 05/12/16 08:46PM Downloading a new version of CrashPlan.
    I 05/12/16 08:46PM Download of upgrade complete – version 1435813200470.
    I 05/12/16 08:46PM Installing upgrade – version 1435813200470
    I 05/12/16 08:46PM Upgrade installed – version 1435813200470
    I 05/12/16 08:47PM CrashPlan stopped, version 4.6.0, GUID 651660719697690647
    I 05/12/16 08:49PM Synology extracting upgrade from /var/packages/CrashPlan/target/upgrade/1435813200470_317.jar

    When I look into /var/packages/CrashPlan/target/upgrade there are no jar files. The total content of the upgrade folder is:
    drwxrwxr-x 3 root root 4096 May 12 21:04 .
    drwxr-xr-x 8 root root 4096 May 12 21:04 ..
    -rw-rw-r– 1 root root 127 May 12 20:46 start.bat
    -rw-rw-r– 1 root root 92 May 12 20:46 startDesktop.bat
    -rw-rw-r– 1 root root 135 May 12 21:04 startDesktopLinux.sh
    -rw-rw-r– 1 root root 312 May 12 21:04 startDesktop.sh
    -rw-rw-r– 1 root root 137 May 12 21:04 startDesktopSolaris.sh
    -rw-rw-r– 1 root root 87 May 12 21:04 startFirst.sh
    -rw-rw-r– 1 root root 211 May 12 21:04 startLinux.sh
    -rw-rw-r– 1 root root 247 May 12 21:04 start.sh
    -rw-rw-r– 1 root root 213 May 12 21:04 startSolaris.sh
    drwxrwxr-x 2 root root 4096 May 12 20:46 UpgradeUI

    Reply
    1. Chris G's avatarChris G

      The simple solution from Gert Serneels fixed my exact issue.

      The problem was that the upgrade script did not find the cpio command, so I copied it from /var/packages/CrashPlan/target/bin to /bin.
      > cp /var/packages/CrashPlan/target/bin/cpio /bin/cpio

      Stop CrashPlan, then re-start. The install process for 4.7 includes Java if it is missing, if I read the install log file correctly.

      Reply
      1. Guy's avatarGuy

        Yves/Ole
        I have exactly the same symptom and log file results also. I tried uninstall/reinstall etc without success.

  18. Martin's avatarMartin

    Excellent work gentlemen! Thank you very much!

    I’m back up and running. DS1513+, Syno java8, Crashplan 4.7

    I just followed the previous steps:

    1. Copy cpio
    2. Update Java path
    3. Re add Heap Size value

    Reply
      1. Martin's avatarMartin

        Probably redundant at this point, but I just read the previous posts and pieced it all together from there. Good luck!

    1. Tom K.'s avatarTom K.

      As a suggestion, I would recommend using a symbolic link to your local bin vs. copy of the cpio binary to ensure that you are always using the most recent version of the software: eg: “sudo ln -s /var/packages/CrashPlan/target/bin/cpio /usr/local/bin/cpio”

      Reply
      1. Monte Moore's avatarMonte Moore

        hello all, I am so new to this synology stuff it’s scary. I’m trying to read an learn all I can. I had a friend with much greater knowledge than I help me set up my synology with my imac. It took forever to get it going and I think I accidentally figured it out myself. I was up and running and then the update to java occured and now crashplan just says cannot connect to backup engine. I’ve checked to make sure that the IP addresses on both the NAS and the client are the same and they are. I noticed on the synology that crashplan read “stopped” I can uninstall and then reinstall and it only runs for about 1 minute or less the reads “stopped”. Can anyone offer assistance to something I might be overlooking. I’m really wanting to get this thing running and you guys are so much smarter than I on this stuff. Any help in very clear terms would be VERY much appreciated. Thank you,
        Monte M.

  19. bc3tech's avatarbc3tech

    alrighty, throwing in the towel. I just got upgraded to 4.6.0 (like so many others here) but am not a Linux guru. For whatever reason CrashPlan won’t start up now. I’ve edited install.vars using vim to point JAVACOMMON to the path of my installed java instance (/var/packages/Java7/target/j2sdk-image/jre) but it still doesn’t start up.

    Any help would be appreciated. Thanks.

    Reply
    1. Monte Moore's avatarMonte Moore

      Hal,
      I very much appreciate the time you took write to me and provide the link. Do you have the link to the crash plan 4.7?
      Will I need to go to the synology DSM’s package center and delete the pcloadletter.co.uk and then reinstall that?
      My client crashplan is 4.6.0.
      my NAS currently has 4.6.0-0038
      Man this stuff is strange if you’re not used to it. You guys are genius in my book. I have a DS1515+ hooked up to an iMac. I hope you don’t mind me asking questions and again, I very very much appreciate any help you are gracious enough to give.
      Thank you so much for your help.

      Reply
      1. Monte Moore's avatarMonte Moore

        Thank you so much.
        I’ll use your information. Will probably be asking for more help. Thank you so very much!!!

  20. Luca Merega's avatarLuca

    Funny, but I am still on 4.6.0. Crasplan is not downloading 4.7.0 and is working flawlessly right now…

    Reply
    1. Monte Moore's avatarMonte Moore

      is 4.7 something that is automatically downloaded by the client or the synology NAS? I am reading where others are running 4.7. not sure where to find this? my synology NAS running 4.6 and client running 4.6 arn’t working. initial set up it ran for about 10 days then the updates happened etc. In over my head I guess but think I could fix if it had some help because this is almost to technical for me. I’m a beginner…..trying though.
      Any help would be appreciated. Thank you!!!!

      Reply
    1. Albert's avatarAlbert

      What is exactly meant by “reinstall”? uninstall and install aftwerwards? and what is the reason for this? Can you describe it more precisely?

      Reply
  21. Darth Null's avatarDarth Null

    I reinstalled yesterday and still haven’t seen 4.7 download. Is that something that can be forced? Is it automatically started on the synology side (by(some obscure set of conditions)? Or is that somehow initiated by the GUI client (which is also only 4.6, it seems)?

    So far, my system hasn’t been blocked, so either the 4.7 requirement isn’t yet fixed in stone (or has been delayed) or I misunderstood the warning email we got a couple weeks back.

    Reply
  22. Cameleon's avatarCameleon

    Here’s a funny one then, my Synology (DSM5, CP 4.6) is reporting the service is running, I can log on via my laptop client to the headless daemon and it shows all has backed up fine, regardless of the fact it says update failed. However, online, CP is showing I haven’t backed up in 5 days. Anyone else still on CP 4.6 seen this? I’ve been holding off going to 4.7 until Patters releases an updated package.

    Reply
    1. Darth Null's avatarDarth Null

      I still haven’t seen 4.7.0 downloaded at all. I uninstalled and reinstalled earlier this week and haven’t seen anything. Is there a way to force a download? Does it depend on the GUI client you’re using? (mine is 4.6, maybe the client isn’t instructing the server to grab a new copy?)

      Reply
    2. GaryS's avatarGaryS

      Luca,
      Please clarify:
      Does Step 4 Change /var/packages/CrashPlan/target/install.vars putting JAVACOMMON= need a path after the equal sign?

      Does the jna-4.2.2.jar support an ARMv5?

      Reply
  23. Karl Grindley (@karlg100)'s avatarKarl Grindley (@karlg100)

    I’ve discovered that using Oracle Java 7 (from oracle) works far better than the synology java release. CrashPlan was stalling after ~24 hours of operation, but with Oracle 7, been running for days without issue (albeit still slow) unless I restart it for some reason.

    Reply
  24. Baget's avatarBaget

    I can’t get my CrashPlan 4.6.0-0038 to start on my DS713+
    on engine_error.log
    I’m seeing the following:
    Error: Could not find or load main class com.backup42.service.CPService

    Reply
  25. M's avatarM

    Got it working on my ds214play: DSM 5.2-5644 Update 5, syno java 7, crashplan 4.7

    Used https://crashplan.setepontos.com/crashplan-4-7-0-installation/ suggestion 3 (fresh install with the update file unpacked before starting up first time) . Tried number 1 but never got it to work. But 3 worked :)
    0. Save the update .jar file (before it gets deleted)
    1. Uninstall CP
    2. Install CP, but don’t start it.
    3. Unpack the .jar file and use 7zip to extract the content (I did this in windows10).
    4. Copy the content to /var/packages/CrashPlan/target replacing any already existing files.
    5. Check your JAVACOMMON= in /var/packages/CrashPlan/target/install.vars
    6. Start up CP (you will probably get an error)
    7. Start up CP again. (Now it will work)
    8. Check your /var/lib/crashplan/.ui_info and update the “C:\ProgramData\CrashPlan\.ui_info” (on Windows) if needed.
    Done!

    Reply
  26. edyouk8's avataredyouk8

    I’ve tried the various solutions on my DS411 with no luck. Does anyone have any more details about what’s up with the ARM architecture and possible solutions?

    Reply
  27. Vlad's avatarVlad

    Hi,
    Do you guys have both nas 4.7 and desktop client 4.7 installed? I do, buy my desktop client doesn’t want to back up. It’s stuck on waiting for backup and initial backup not complete. However, I do see all of my original folders/files selected. Below are my logs. The NAS history log shows 4.7 started and running but the NAS engine error log shows a java could not initialize error. Any help would be great.

    History log
    I 05/22/16 07:41PM CrashPlan started, version 4.6.0, GUID 673288868894081125
    I 05/22/16 07:41PM Stopping CrashPlan
    I 05/22/16 07:46PM CrashPlan started, version 4.7.0, GUID 673288868894081125

    Engine_error.log:
    Exception in thread “W31287725_ScanWrkr” java.lang.NoClassDefFoundError: Could not initialize class com.code42.jna.inotify.InotifyManager
    at com.code42.jna.inotify.JNAInotifyFileWatcherDriver.(JNAInotifyFileWatcherDriver.java:22)
    at com.code42.backup.path.BackupSetsManager.initFileWatcherDriver(BackupSetsManager.java:416)
    at com.code42.backup.path.BackupSetsManager.startScheduledFileQueue(BackupSetsManager.java:354)
    at com.code42.backup.path.BackupSetsManager.access$1600(BackupSetsManager.java:71)
    at com.code42.backup.path.BackupSetsManager$ScanWorker.delay(BackupSetsManager.java:1145)
    at com.code42.utils.AWorker.run(AWorker.java:157)
    at java.lang.Thread.run(Thread.java:745)

    Reply
  28. Vlad's avatarVlad

    I found my (Dumb) mistake One of the required steps for java to work is to download the jna-4.2.2.jar file (from maven.java.net) and and put it in the /var/packages/CrashPlan/target/bin folder. After, rename the original jna.jar to jna.backup and rename the jna-4.2.2.jar to jna.jar. When i did the last renaming step and renamed the file to jna.jar it registered “.jar” as part of the name. I fixed this by renaming jna.jar to just plain jna
    It is now synchronizing
    thanks

    Reply
  29. Alfred's avatarAlfred

    Hello,

    I tried every manual I could find but I can’t get 4.7.0 up and running on my DS415+. I’m probably doing something wrong. I end up with 4.6.0 and the message upgrade failed. I tried to follow the third option on https://crashplan.setepontos.com/crashplan-4-7-0-installation/

    I unpacked the update.jar file, from this I unpacked the upgrade.cpi file which gave me a file named “upgrade”. After renaming it to upgrade.jar I placed in in the upgrade folder. Then I used 7z e -o/var/packages/CrashPlan/target/lib /var/packages/CrashPlan/target/upgrade/upgrade.jar to put in in de /target/lib folder

    I started with a fresh install, copied the cpio file, changed the install.vars. I followed every step but it keeps going wrong. I hope someone can help me.

    Reply
    1. Ronald's avatarRonald

      The big problem is how to change this.
      In DSM 6 you can not login as root with winSCP
      any suggestions?

      Reply
      1. patters's avatarpatters Post author

        It did that for me for CrashPlan PRO, but worked for CP and CP PROe. I re-checked everything size, checksum etc. and it was all correct. Tried again and it installed fine. Hosting provider glitch perhaps.

      2. Hal's avatarHal

        Holy Cow, It’s been week and crashplan hasn’t made any changes!! hahahahaha

        hal

  30. patters's avatarpatters Post author

    Hi all, I have updated the package to CrashPlan 4.7.0. I have baked in a check to force using the system JRE and not the bundled Intel one that Code 42 sometimes force, and I have also hopefully fixed the ARMv7 systems broken since 4.6.0 by including a Maven build of JNA 4.1.0. I notice many of you were using a newer one, but I think it’s prudent to keep the version consistent with the one bundled by CrashPlan. Let me know if it fixes the problem.

    Reply
    1. Udoggie's avatarUdoggie

      Installed on my DS415+ with DSM6 and seems to be running great! Thanks Patters! -Jeff

      > PC LOAD LETTER > May 24, 2016 at 5:13 PM > patters commented: “Hi all, I have updated the package to CrashPlan > 4.7.0. I have baked in a check to force using the system JRE and not > the bundled Intel one that Code 42 sometimes force, and I have also > hopefully fixed the ARMv7 systems broken since 4.6.0 by including a Ma” >

      Reply
  31. GaryS's avatarGaryS

    Hi Patters – I can confirm that miraculously Package 40 seems to be working so far on my ARMv5 211J.Using your JAVA 8 package.
    Seems to work fine with the default xms at 80m. Previously had to set xms to 1024m.
    Nice work,
    Gary

    PS. I guess I can finally delete “this handy PDF document” I posted in 2012. You may want to remove the link in your introduction on this page.

    Reply
    1. patters's avatarpatters Post author

      Haha, I only left it on there by way of context, and because I kept losing it and taking ages to find it again. You certainly paved the way for the package.

      Reply
  32. patters's avatarpatters Post author

    Can anyone confirm whether the latest package works for DS215j systems in particular? It seems that Synology changed this model’s OS build for DSM 6.0 from ordinary armv7l to armhf (hard float with NEON). If that is indeed the case the CrashPlan package may be broken currently for the DS215j running DSM 6.0.

    Reply
    1. patters's avatarpatters Post author

      True, he confirms it’s DSM 6.0 in a comment made on the 11th April. No problem then. Had suspected the Java package might need to change.

      Reply

Leave a reply to Paul Cancel reply