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. Mitchell's avatarMitchell

    Thanks Patters. I uninstalled Java 6 and Crashplan. I then did the DSM upgrade that just came out. I then installed Java 7 and reinstalled Crashplan. It started the backup. However, still, when I launch the CP Client, it kicks me off in about 30 seconds. Is anyone else having this problem? Any recommendations? Thanks. Mitchell

    Reply
    1. C Farley's avatarC Farley

      I have a DS412+ as well with the exact same problem.
      I have uninstalled everything, reinstalled everything, always with the same results.
      The crashplan package will not stay running.
      I have tried java 6, 7, & 8. All with the same results.
      This morning I updated to DSM 5.0-4458 Update 1. The problem continues.

      Everything worked fine with the crashplan package 0026. Since I upgraded to 0027 I have been unable to run the package.

      No backup for 10+ days now. Sweating here…

      Reply
      1. ZeusII's avatarZeusII

        How did you install java? Are you using the SPK from “community” or the official one from Synology?

        I had no problems using Java 7u51 but I’m using Java Manager from Synology.

      2. C Farley's avatarC Farley

        I originally had the Synology Java Manager, but switched to the “community” java when I started having this problem.
        I have now done a clean install of the Synology Java Manager, new download of jdk-7u51-linux-i586.gz, and a clean install of CPpro. Still having the same issue.
        CPpro package will not stay running for more than one or two seconds.

        I’m at a total loss to figure this out. It was working just fine in 0026.
        DS412+ with the latest DSM

      3. JohnV's avatarJohnV

        @C Farley
        I’ve had the same problem. The way I fixed was this:
        (timing is critical as CrashPlan runs for short while then stops, make sure to complete these while CP still runs)
        – remove the backup schedule if you have one (make sure it is always run). Settings->Backup->”Backup will run” ->Always

        – go to the backup selection selection, and add/remove a file to be backed up. (basically need to make a change) Backup->Files->Change

        – go to backup schedule screen and verify selection; Settings->Backup->”Verify Selection Every” -> NOW

        Now go back to Backup->Files and observe files being checked, etc.

        that solved my problem. Hope this helps.

    2. Peter's avatarPeter

      Since my upgrade to DSM 5.0 and crashplan 3.6.3-0027 on my 1511+ I’ve had problems with backing up to crashplans servers.
      I Get an error in the client program “crashplan disconnected from backup engine”, and the program exits.
      I tried upgrading to Java 8, but that didn’t make any difference.
      I think the NAS connects to crashplans server, since I can see it in the log, on their web service.
      Th error happens during scanning of the files to be backed up, and i does repeatedly.
      The I noticed the ram usage allways reached 72% and the dropped simultaneously with the application crash.
      That made me wonder if the memory handling/usage in DSM 5.0 had changed, and i reached the maximum allocated to the crashplan service.
      My first thought was to order some more RAM (additional 2 GB, since I have the standard 1 GB), and that is on the way now.
      Then I realized, that it is possible to allow crashplan to use more than the standard 512 MB by editing the file
      “/volume1/@appstore/CrashPlan/syno_package.vars”
      I changed it to 720M
      And now the memoryload in the webinterface widget shows 82% and turned orange (screaming for more RAM).
      top btw shows:
      17580 1 crashpla S N 817m 82.3 0.0 /volume1/@appstore/java8/ejdk1.8.0/lin….

      But at least the crashplan client i still running, and continuing to scan 106.000+ files and counting.

      For now I’m just holding my breath, hoping for lack of RAM to be the solution.
      Regards
      Peter

      Reply
      1. Peter's avatarPeter

        …And what a relief.
        For me it seemed to do the trick.
        DSM 5.0 must be a bit more hungry when it comes to memory.
        I do hope this will be helpful for others in here.

      2. Peter's avatarPeter

        All of which is described above in the notes.

        Thanks for a beautiful piece of software btw.

      3. benstrousers's avatarbenstrousers

        Changing the heap size has worked for me previously. After the I upgraded to DSM5 the heap size reverts to 512.

      4. benstrousers's avatarbenstrousers

        For now I changed the max java heap size in the start-stop- status script to the max of what I wanted it to be, seems to be working. Any other ides?

    3. Nick Harvey's avatarNick Harvey

      Hi – I havent used Crashplan before, but am giving up an a 100gb backup to another Synology as it never completes! Does Crashplan have the ability to speedlimit backups at certain times, so that the entire upload bandwidth is not hogged during the working day?

      Reply
      1. thaBadfish's avatarchcdesign

        Make sure you are both running the same version of crashplan (3.6.3) for both desktop client and DSM package. I read some other comments about someone not being able to stay connected to a friend using 3.5.x when they were on 3.6.3. I only backup to crashplan central, so I don’t know anything else about this, but I saw a bunch of comments while researching another problem.

    4. Ethan's avatarEthan

      A dumb question….I just installed (I think) Java 8 and Crashplan on a 1513+ with DSM 5.0. Package center says everything running. I just installed the desktop client on my mac. Now what? Do I launch an app on the NAS (I don’t see it listed as an app to open and see a UI). Ultimately I want to have the 1513+ NAS use Crashplan to back up to an off site DS 414 NAS. How will I set that up?

      Thank you!

      Reply
      1. John B.'s avatarJohn B.

        Go to the top of this page and read the “NOTES” section carefully.

        CrashPlan is basically split into two parts, the “app” you launch on your Mac and a “service” that runs 24/7 on your Mac performing whatever backup (or restore) work you have asked it to do in the background. You use the “app” to tell the “service” what to do and when to do it.

        When you installed Crashplan on your NAS, you only installed the “service” part.

        The “NOTES” section explains how – using the serviceHost setting – you can get your “app” to point to the *NAS* “service”, thus enabling you to configure your NAS from your Mac.
        And you just remove the serviceHost value to get it to point back to your Mac.

        I have no experience in NAS-to-NAS backups, but why use CrashPlan for this?
        I’m sure it’s possible but I’m just curious as to why you’re not using “Backup & Replication” in the “Main Menu” for this (if anyone else has pros/cons for “Backup & Replication” vs CrashPlan, please give your feedback :-)

      2. Ethan's avatarEthan

        Thanks – I did figure that out. Crashplan lets me do an encrypted backup (1 Nas will be off site) and allows for retention of multiple versions. They Synology solutions can’t do both of those at once.

      3. John B.'s avatarJohn B.

        Forgot: some people have reported issues with Java 8, and their solution was to use Java 7 instead.

      4. John B.'s avatarJohn B.

        I guess you’ve then just installed CrashPlan on both NAS and is using the Friends functionality to backup from one to the other? I think that’s even free (and legal :-).

    1. C Farley's avatarC Farley

      Guido, Does your crashplan package have anything in the ‘Logs’?
      I lost all my records when uninstalling and re-installing, but I was wondering if there was anything useful there.
      You can view more detailed notes in the folder DISKSTATION\crashplan\log\engine_error.log
      Are you using crashplan Pro?

      Reply
      1. Chris's avatarChris

        Hi,

        Same here: updated the box to DSM 5, installed Java 8 and CrashPlan is closed after a couple of seconds (tried increasing memory, to no avail). That’s what I see in the logs by the VM (part of it):

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0x00006524, pid=16654, tid=1561998448
        #
        # JRE version: Java(TM) SE Embedded Runtime Environment (8.0-b132) (build 1.8.0-
        # Java VM: Java HotSpot(TM) Embedded Client VM (25.0-b70 mixed mode linux-arm )
        # Problematic frame:
        # C 0x00006524
        #
        # Core dump written. Default location: /volume1/@appstore/CrashPlan/core or core
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.sun.com/bugreport/crash.jsp
        # The crash happened outside the Java Virtual Machine in native code.
        # See problematic frame for where to report the bug.
        #

        This message is printed lots of time for different threads. Any ideas?

      2. John B.'s avatarJohn B.

        @Chris – there have been a few posts about problems with Java 8. Try one of the older versions, 7 or 6.

    1. C Farley's avatarC Farley

      Vincent, which diskstation do you have? Which crashplan are you running e.g. PRO?
      Thanks for sharing your success.
      I am still dead in the water after doing what you describe with my 412+ running CPPro

      Reply
  2. C Farley's avatarC Farley

    I don’t want to come off as an ungrateful jerk, but….
    I have tried all combinations of Java (“community” vs Oracle, 6, 7, & 8) and fresh installs of 0027 CrashPlanPro, and nothing works. The CP package shows “Running” for one second and then changes to “Stopped”. It is not running long enough to even click “Stop”.
    I’m dead in the water now for two weeks. It seems that at least a few other people have had the same problem.

    Could the 0026 CrashPlanPro be put back up on the Package share please?

    Reply
    1. C Farley's avatarC Farley

      Just out of curiosity, I installed the plain version of CrashPlan (not PRO) and had the same results as above.

      Reply
      1. Mitchell's avatarMitchell

        I would like to try the have you download from the non-java site. Can you tell me where to get it? Thanks.

      2. C Farley's avatarC Farley

        I appreciate all advice, and the humor.
        I uninstalled all java, then restarted.
        Installed java from oracle and CPPro then restarted.
        The problem continues unchanged.

        I see that others with the 412+ are having the same issue.
        My 412+ is fairly new, purchased in February. Anyone else?
        It is the INTEL Atom 2.13 GHz processor with 1 GB of memory.
        The RAM usage is typically around 12-15% so it’s not a low memory issue.

      3. Mitchell's avatarMitchell

        Me too, unfortunately. Is there a series of steps that we would all execute in sequence, that is exhaustive, that could facilitate the debugging process, and, provide insights that could be helpful in solving the problem?

      4. John B.'s avatarJohn B.

        Is there a DS 412+ user out there that has got this running?
        If so, please specify which versions of hardware and software (DSM, CP/CPPro and Java).

        I have a DS 411+II with:
        * DSM 5.0-4458-Update 1
        * CrashPlan 3.6.3-0027
        * Oracle Java Manager running Java 7.0.51-0021

        I use backup sets in order to conserve memory and reduce the total number of files processed in one go.

      5. C Farley's avatarC Farley

        I’m so glad to see that apparently it isn’t just me and my ineptitude that broke CP.
        No solutions for me yet.
        Just to add to the system info I have the 412+ with DSM 5.0-4458 Update 1, I have tried all the variants and combinations of java and crashplan.

      6. C Farley's avatarC Farley

        Just for laughs, I installed DSM Update 2 this morning to see if that would fix the problem.
        Uninstalled java & CPPro, rebooted, installed patters java 7 and CPPro.
        The same problem continues. Unchanged.
        I’m a Linux idiot, if anyone has any more advanced troubleshooting tips I could try, I sure would appreciate hearing from you. I’m at 18 days without cloud backup :(

        The patters CPPro package was the major factor for me in deciding to buy Synology…

      7. Don Anderson's avatarDon Anderson

        Bummer, I was really hoping that would address it.

        Is there a log file that at least can be viewed to see where it is failing? For me, no log entries are made in package manager or in the devices log.

        Thanks
        Don

      8. thaBadfish's avatarchcdesign

        I have a DS412+ and I’m up and running, though it hasn’t been painless.

        I received an email that backup hasn’t completed in 5 days (for our office server), and after checking package center I saw that crashplan pro was stopped (3.6.3-0027). I couldn’t start it, it would just stay stopped.

        I uninstalled crashplan pro and Java 8 from my DSM, and installed Java 7 (1.7.0_55-0024) and crashplan pro (3.6.3-0027) from the community packages. I didn’t have a problem from this point with my DSM or packages, but I did run into issues with my desktop app for crashplan. I had to reinstall, then adopt a previous crashplan file settings, reconfigure the ui.properties files for crashplan (program files/crashplan/conf/ui.properties – remove “#” from serviceHost and add IP address for my DSM). It still wouldn’t backup new files, until I realized that I forgot to set the new crashplan DSM user permissions for the shared folders I wanted to backup.

        So, in short, I have a DS412+ running DSM 5.0-4482 with crashplan pro (3.6.3-0027) and Java 7 (community)(1.7.0_55-0024).

  3. Don Anderson's avatarDon Anderson

    Same with me. I have a 412+ and tried to update to 0027 and since then crash plan will not staying running. I have tried uninstalled and reinstalling a number of times, rebooting, etc.. but it hasn’t made a difference. Log files are empty. Any chance that 0026 can be made available?

    Thanks

    Reply
    1. bruno's avatarbruno

      after stopping crashplan package, deleting synology java package, install patters java7 package + fresh download of java7 from Sun, everything seems to work fine now (~18h of running package)

      Reply
      1. bruno's avatarbruno

        after 18h, everything goes wrong again and crashplan restarts every 2 or 3 mins…
        i willtry to delete java again…

  4. Bjorn's avatarBjorn

    I have your package running OK on a XPEnology computer, running DMS5 (quad avaton processes, 16gb ram). I’m using the crashplan server on the xpenology and sending the data to it from a client on the same network, 1gb speed.

    I have tried sending normal files on the samba share, and I get around 700mb/s while doing this, but when I’m using crashplan I get around 50mb/s (~6megabyte per second). Looking at the resource monitor, the disk utilization is around 10-20%, cpu at 4%, and memory at 1%. Ssh:in into the machine gives about the same info, the crashplan thread in top is around 4-5% and mostly in S state, meaning its sleeping.

    On the client side, there are no queues on the HDs, no threshing on the harddrives, the cpu is at a very low percent. Backing up to a local drive will go tremendously quicker.

    I have tried to change the nice level on the server from 19 to 0 to see if that did any difference, and it did not. I have made sure the throtteling on both the client and the server are of (no limits sending when present/away both LAN and WAN). Tried changed it on the client to 100kbs just to see that the change did take effect; they did. Only wierd part was that it was the WAN settings that took effect, not the LAN. And yes, they are on same network, same subnet, same router.

    Any thing that might be causing this? It should go faster, and it seems that both the client and the server are idling on both their sides.

    /Björn

    Reply
      1. Bjorn's avatarBjorn

        No, this isnt uploading to Crashplan, this is my pc (client) to my synology (server). On a normal non crashplan+ plan.

  5. Timbo's avatarTimbo

    Adding my experience – I had Crashplan running on my Diskstation on DSM 4, and upgraded to DSM 5, to find it didn’t work anymore. All that was required was to uninstall Crashplan, uninstall Java SE Embedded 7, then reinstall Java then Crashplan. Works great again.

    Reply
  6. huelsi's avatarhuelsi

    I’ve successfully installed CrashPlan on my DSM 5 based NAS. Thanks for the great job and for providing the package & instructions. I’ve one question regarding the deletion of backed up files. Usually if files that have been backed up are deselected in the CP Client those files should be deleted from the CP servers. It seems though that this is not working. Although I’m getting a warning that those files be deleted they are actually not.

    Reply
  7. arash's avatararash

    I’m curious if anyone else has fixed this issue.

    I’ve got Crashplan up and running on my NAS and it seems to be backing up fine, however the CrashPlan service stops after a few hours. When I check the log, it says the following:

    “Reason for stopping backup – Nothing to do”

    I’m not sure if thats the actual cause, but its frustrating as it requires me to login and restart the service. Any ideas?

    Reply
  8. schroeb's avatarschroeb

    DS 412+ here running fine on DSM 5.0-4458 Update 1, with Crashplan 3.6.3-0027 and Java 1.7.0_51-0023 (also from patters).

    My installation is currently handling a 2TB+ backup on Crashplan. Upgraded to 2GB RAM and adjusted the appropriate options to have the system use enough of it.

    Had a memory-leakish behaviour with Java 8 so I went back to 1.7.0, absolutely no issues since then.

    Reply
    1. C Farley's avatarC Farley

      Count yourself fortunate. I did a fresh uninstall, restart, install, this morning as I do most mornings, and still nothing.
      What “options” are you changing for memory usage.
      Thanks for your input!

      Reply
    2. Bjorn's avatarBjorn

      Have your tried to send files through your crashplan-client from your PC to your DS412? EI just use Crashplan localy and do computer to computer? If so, what speed do you get, and what kind of network do you have? I’m trying to get a benchmark on how fast it should be. I’m getting very (compared to normal file copy) slow speeds.

      Reply
      1. Alexander's avatarAlexander

        Doing local backups, from a Windows PC to the Synology, or between two Synologies, will display speeds up to 120 Mbps, and I’m on a Gigabit LAN.
        Keep in mind that CrashPlan does encryption, compression and data deduplication. In other words, it does more than a simple file copy, hence cannot reach the full speed of your LAN.

      2. Bjorn's avatarBjorn

        You sort of have a point there, but I’m running this on a xpeology (ordinary PC, 4-core Avoton processor and 16gig ram), and I can see the CPU-load on my server-machine, and its at 4% doing this. Nor is the HD or the network maxed out, not even close. So its not stressing the server enough to choke it down to this low speed. Ergo, somthing else is making it go slow. Do your CPU and/or HD max out during your backups?

  9. 7bit's avatar7bit

    Thanks a lot for your work! The packages are working great for me!! I am using DSM 5.0 Update 1 on a DS214play with Synology Java 1.7.0_51 and your Crashplan Home package.

    Working like a charm! Keep up the good work!

    Reply
  10. Anders Heilemann's avatarAnders Heilemann

    I trying to optimize my DS212j (ARM 1.2ghz – 256MB memory) on a 30/5mbit connection to handle as large crashplan backups as possible, so far I’ve set:
    Java heap size to 512MB
    De-Duplication to MINIMAL
    dataDeDupAutoMaxFileSizeForWan = 1 (http://goo.gl/4DXkn7)
    Compression to OFF
    Watch file system in real-time to Off
    (After initial backup I’ll set it to backup at night using a cron job to enable hibernation)

    Questions:
    1. – What happens if the heap size is bigger than the amount of physical memory? Does it start caching (slower backup, but still working?)
    2. – I’m using java 7 but wondering if java 6 or 8 might be lighter on memory usage (and if someone managed to fix the memory leak of java 8 as reported by schroeb above)
    2.5. – Perhaps some settings exist in Java to make it more memory efficient?
    3. – Crashplan is making identical backups from volume1 to volume2 and to the cloud, since only one backup is running simultanously, I don’t suppose two destinations take up more memory than one?

    Have anyone done other changes to improve the performance?

    Reply
  11. Aram G's avatarAram G

    The first time I set this up it worked like magic, then Synology put out an update and it all went to hell. Since then, I was able to re install CP on the NAS drive but I am unable to configure it. Meanwhile, the backup files from the NAS disappeared from CP and I am still not sure it is not lost entirely.
    Any trouble shooting tips would be appreciated….

    Reply
      1. Aram Gerstein's avatarAram Gerstein

        Sorry for the delay…
        DS413
        Update: Crashplan was able to restore my missing NAS files on the Crashplan server.
        At this point Crashplan appears to be up and running on the NAS but I have not been able to configure the headless client.
        I have tried the various methods described on the web but to no avail. Initially I was able to use the local app on my pc to configure, by modifying the ui.properties but at this point the local app will not connect to the Crashplan client on the NAS.
        Any suggestions are appreciated…

      2. thaBadfish's avatarchcdesign

        Make sure the “crashplan” user in ur DSM has permission to read the folders you wish to backup. It should allow your desktop app to see the entire contents of your folders (assuming you setup ui.properties correctly).

    1. Aram's avatarAram

      FIXED!
      My local app would not connect to the headless Crashplan client on my Synology DS413 NAS.(4x3TB). I found the solution on another blog and tried it (having no expectations of success) and I could barely believe it when it worked..
      For those who are running a firewall on their Synology:
      Go to Control Center>Security>Firewall>Allow/Deny tab.
      Click Create, choose Custom.
      Type: Destination port. Protocol: All (if anyone knows the specific protocol…).
      Port: 4243.
      Click OK, OK, and be sure to hit “Save”.

      Reply
      1. Aram's avatarAram

        Ha Ha! Now that it is working I get to experience what so many here have been complaining about. I have about 2TB to back up by now and of course Crashplan is constantly stopping. I have 1GB RAM (non upgradable) and hopefully I will be able to make adjustments that resolve the issue.
        I am not experienced with Putty or ssh but I am learning fast.

  12. C Farley's avatarC Farley

    CrashPlanPro on DiskStation 412+ is back up and running!! That’s the good news.
    The less-than-good-news is that in order to make it work again, I had to downgrade my DSM to 4.3. The process was pretty easy, even for me, by following this great guide http://patrickscholten.com/downgrade-dsm-previous-version/

    The only downside that I see so far is that my DiskStation shows up as a new device on the CrashPlan portal. I did an “adopt a device” on the CP web interface. It says it will not have to do another initial backup if you do that. it appears to be picking up right where it left off 20 days ago.

    I recommend the downgrade! But it is a work around solution, SINCE I KNOW THAT CrashPlan 0026 DID WORK JUST FINE with DSM 5. But until a PROVEN CrashPlan package FOR DSM 5 comes out, I will not be upgrading DSM. (or if 0026 were made available I might go that route)
    For now the current 0027 package works with DSM 4.3, so I’m sticking with that.

    Reply
  13. Shane's avatarShane

    Hi guys. I had a problem when updating from 4.x to 5.x Looking at all of the info here I removed java and crashplan then reinstalled both. I have Java 1.6.0_38-0023 and Crashplan 3.6.3-0027 installed and working on my DS1512+. I had to adopt the data I had uploaded to Crashplan (I did two checks, not sure what the first one was called but the second was a block sync). The block sync did take a while as I have 6.5 TB in queue to be backed up (4.9 TB to go!) I am also backing up a family members data. I knew about updating the heap for Java and that had been done last year and the setting is still in place. All is working well for my own data and family members. I am currently running DSM 5.0-4458 Update 2. I do like the new look but like with Windows (insert version here) they have moved things around and am still getting used to it.

    On a side note, I use Chrome and ScriptSafe, has anyone seen when they login to DiskStation that the site refreshes for no reason? Maybe there is a setting in the new DSM that I have not see. 4.x did not do what 5.x is doing.

    I want to thank this community for all their input. I know there are still people out there that are having problems still but I see that there is so much help and everyone here is just awesome. It is good to see this type of communication. Glad I bought my Synology and to have all of this help here when needed.

    Reply
  14. Tim's avatarTim

    Hi all,
    I’m a novice to all this and I’m having trouble figuring out how to change the heap size. I can’t find the file that I’m supposed to modify to do this. Is this a hidden folder that I can only access through special means other the browsing through the file station? I’ve been searching for how to do this but it seems like most people already know how and nobody is asking the same question as me. I have about 2TB to backup from my DS1813+ and of course it keeps crashing and restarting. If somebody could point me in the right direction I’d really appreciate it.

    Reply
    1. patters's avatarpatters Post author

      You need to log in to your syno using SSH (use PuTTY if you’re on a PC, or ssh root@1.2.3.4 from a terminal session on a Mac – where 1.2.3.4 is the IP of your NAS). Username is root, password is the same as the admin account one. Then you need to edit the file /volume1/@appstore/CrashPlan/syno_package.vars
      You will need some familiarity with the Unix text editor vi. You can Google this.

      Reply
      1. Tim's avatarTim

        First of all, I want to thank you for your work in behalf of everyone for making these packages and even making headless Crashplan even an option for us. What you’ve done is really cool and I appreciate it. I followed it all right through till this point. I think for me though, it’s getting to the point where Crashplan is becoming more work than it’s worth. Even when my server was a Win XP machine it seemed like I was constantly experiencing problems with it. Maybe if I followed the final additional steps necessary to get it working on the NAS it would be fine, but I can’t really justify the headache for me, as well as this being the only reason I’d need to upgrade my memory from 2gb. And then what happens when I need to back up more than 4tb? Anyway, yesterday I made the decision to move to a service that works easier and without Java. I went with Zoolz since it’s only $36 for a year so it’s not a big risk if I decide I don’t like it. So far so good, uploaded 116gb in about 18 hours. It would be nice to run the backup directly from the NAS but for me it’s not necessary. And I need an off-site backup purely as a safeguard against a local disaster so I don’t need much with versioning or immediate file recovery. Anyway, thanks again for the additional information so quickly. I wish as a business owner I had more time to try out some of this stuff, but sometimes I gotta cut my losses and move on!

    2. Shane's avatarShane

      Hi Tim. Do a search on this Web site for WinSCP. I posted something on here how to modify that file. It was a while ago but I found that using WinSCP instead of Putty is much easier.

      Reply
  15. Jason's avatarJason

    I had to upgrade from DSM 4.3 to DSM 5 because of the Heartbleed bug. I was running Java 1.7 and CP Pro 3.5.3 with no problems.

    After upgrading, I uninstalled Java and attempted to reinstall Java 7 using the latest download from Oracle, but they’ve moved to Update 55, while the package still looks for U51. According to http://www.oracle.com/technetwork/java/javase/7u51-relnotes-2085002.html, U51 expires today (of all days).

    I tried installing Java 8, and CP Pro 3.6.3, but every time I try to start CP, the service just stops again, and the CPU goes 80-100% for a few minutes (java process being most of it). Any ideas? Or would it be possible to get the Java 7 package updated to U55?

    I’m running a DS211.

    Reply
      1. Jason's avatarJason

        Amazing. Thanks for the really quick turnaround on this. Once I installed Java 7 and rebooted the NAS (the key was to reboot it), Crashplan finally started working.

        For anyone else with the same issues: once I installed Java 7, CP would start for about 2 mins and then stop. Each time I restarted it, the same thing happened, until I rebooted the NAS.

  16. maximumfish's avatarmaximumfish

    I’m having a very similar issue to everyone else. DSM 4.3 on a DS1812+ shows Crashplan as running as it always has, but I thought I’d better check in to make sure it’s actually backing everything up before replacing a nearly-dead-but-not-yet-degraded disk. No connection. I checked my emailed backup reports (which I should really pay more attention to) to find that it hasn’t been backing up for over 60 days!

    Uninstalled/reinstalled Java to no avail. Uninstalled/reinstalled Crashplan and now every attempt to start it gives the “Wait a few seconds then stop and restart” message that you get when initially installing. Both DSM’s log and the package’s log folder are empty. Same thing happens with the ‘official’ Java install.

    Now my dilemma is do I replace the disk and hope that the rebuild runs without issue, or do I hold off until I can get Crashplan running and risk the disk dying in the meantime.

    Reply
    1. maximumfish's avatarmaximumfish

      All working again, should’ve tried a reboot before posting! And here was me thinking that “have you turned it off and on again” was a symptom of the Windows world.

      Reply
  17. franman's avatarfranman

    After updating to Java 7 update 55 I have got the same issue with CP and DSM5. The packet starts for about 3 seconds and stops again.

    Reply
  18. Norm's avatarNorm

    I have successfully installed Java1.7.0.55 (many thanks to Patters for the quick fix today)
    With CP 3.6.3.27 package installed and running.
    However, can not ever get CP on my Win8 PC to connect to the Synology unit. I have altered the properties.ui file to indicate the correct IP address.
    Am I missing any other step? CP simply stops at splash-screen and says “can’t connect to backup engine…retry?”

    Many thanks if anyone can suggest a fix.
    Using Synology DS214+ with DSM 5.0-4458 Update 2

    Reply
    1. thaBadfish's avatarchcdesign

      Hey,
      I’ve posted this as a solution to other problems as well, but I think it may apply here.

      Make sure the “crashplan” user in your DSM has permission to read the folders you wish to backup. I was missing this step after reinstalling crashplan pro and Java, but finally solved my problems by setting user permissions from within DSM.

      Reply
  19. G R's avatarG R

    Thanks patters for your work!

    I have Synology 713+ running CrashPlan 3.6.3-0027 with Java 1.7.0_51-0023 running on DSM 5.0-4458 Update 2.

    I have 3.4TB data to backup locally (through Gigabit LAN) and CrashPlan Central. CrashPlan recommends “Code42 typically recommends allocating 1 GB of memory per 1 TB of storage (or per 1 million files)”. It is working locally, but slow. I’m used to seeing ~35Mbps, but it is ~8Mbps once my data when about 3TB.

    When I attempted to raise the JAVA heap size to 4GB, I encounter an error.

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

    Reading through the JAVA SE embedded documentation, I found
    Solution:
    Using 32bit JVM therefore it can’t address more than 4GB (non inclusive). Try installing the 64 bit version

    Would using Java 8 give me 64 bit version I need to go above 4GB? I couldn’t find documentation on JAVA 8 that addressed this. Or is this a Synology implementation of JAVA issue?

    Reply
  20. Stephane's avatarStephane

    Hi Patters,

    – DS213+
    – DSM 5.0-4458 Update 2
    – Java SE Embedded 7 (ejre-7u55-fcs-b13-linux-ppc-e500v2-headless-17_mar_2014.gz) from your package
    – CrashPlan 3.6.3-0027

    Impossible to get the client connected with my DS (backup engine issue).

    I stopped CrashPlan, re-started CrashPlan, rebooted the DS, uninstalled the client and re-installed it… Nothing nothing nothing works…

    Any idea ?

    Thanks in advance.

    Reply
    1. johnh5's avatarjohnh5

      Same as Stephane, but DS1813+. INstalled Java 7 U55, restarted Crash Plan, and it connects and runs for a couple of minutes then crashes. Was working fine before the upgrade to DSM 5.

      Reply
      1. johnh5's avatarjohnh5

        With the update that came out today (DSM 5.0-4482), the crash plan package won’t even start. I click on run and it just says Stopped each time. Ideas?

      2. johnh5's avatarjohnh5

        Yes I did. It runs for a few minutes then crashes as before; the Synology side says it is still running, but the client side keeps saying it was disconnected and when I go back it reconnects and starts scanning again.

      3. Duc's avatarDuc

        I’m also having problems with Java 7 update 55 for the last few days. I installed the java package from Synology. I am getting lots of “com.code42.jna.inotify.InotifyManager ] Unable to add watch for path *blah*, errno: 13” in the service.log.0 file. The update that came out today prevented Crashplan from starting. I was using the embedded package. The engine error log says nice wasn’t able to find /bin/java. This seems to be unrelated to the update 55 problem.

      4. Duc's avatarDuc

        nvm. The com.code42.jna.inotify.InotifyManager error was happening before update 55 too.

  21. Peter's avatarPeter

    I’ve used CrashPlan on other NAS platforms before but you have made the install EXTREMELY easy compared to my previous experience. Thanks for all your work!

    After successfully installing CrashPlan using your packages and connecting to the headless client on a DS412+ running DSM 5.0-4458 Update 2, I have noticed that there are certain system files that I am not able to backup because the crashplan daemon user account you create during the install is not in the root group. I understand that it is not advisable to run CrashPlan as root but is there a way to allow CrashPlan to backup files/directories owned by root and where the group owner of the file/directory is root?

    Thanks!

    Reply
  22. Charlie's avatarCharlie

    Hi all… unfortunately I’m having the same problem here with my NAS 411+ with 2GB RAM (Upgraded), DSM 5.0-4458 Update 2, Java 7 (also tried Java 8) and the most recent CrashPlan package installed. I don’t think I want to mess with SSH, so I guess I’ll just have to wait for an update. Thank you for the hard work! Looking forward to a solution to this ; ) Cheers!!!

    Reply
  23. Adam's avatarAdam

    Hi,

    I have an Ds1512+ and I am using the CrashPlan Proe Client. Now I want update to the newest DSM 5.0 Update 2 and I want to ask if I can use also Java 8?! Now I am using Java 7?!

    So when I have install the update, can I uninstall Java 7 and Update Java 8 or is this not possible?! Or it doesn’t matter which version I use?!

    Thanks for your help.

    Best regards.

    Reply
  24. Heisenberg's avatarHeisenberg

    Hello – your work is really appreciated, thank you.

    I’ve had headless CrashPlan running on my NAS for several weeks without any issues but I am now notified of two important updates.

    My current set-up is below with the recommended updates shown in brackets:

    Synology DS214
    DSM 5.0-4458 Update 1 (READY TO UPDATE: DSM 5.0-4482)
    CrashPlan 3.6.3-0027
    Java SE Embedded 7 – 1.7.0_51-0023 (READY TO UPDATE: 1.7.0_55-0024)

    I am hesitant to update anything because it all works flawlessly at the moment and so many on this discussion seem to have issues after updating.

    If anyone could advise how I should approach these updates, i.e. the order in which I should deactivate, uninstall, reinstall etc. it would be very much appreciated.

    Thanks in advance and greetings from Yorkshire, UK.

    Kenny G

    Reply
  25. Olandese's avatarOlandese

    Today after upgrading to DSM 5 -0.4482 my crashplan package is not starting anymore (i have java 7 and 8 installed) i tried to uninstall crashplan and then reinstall it, but it is still not starting, even after rebooting my Syno.

    In the log i see:

    Crashplan started
    Crashplan stopped

    Reply
  26. scpotter's avatarscpotter

    Adding my experience with DS413j. Worked fine:
    * DSM 5.0-4458-Update 1
    * CrashPlan 3.6.3-0027
    * Java 7.0.51 (patters)

    Not working, with the symptom that Crashplan would stop immediately after starting (would never show up as ‘running’):
    * DSM 5.0-4482
    * CrashPlan 3.6.3-0027
    * Java 7.0.55-0024 (patters)

    Lots of trial and error to get this running, and what eventually worked was moving very slowly through the process with lots of reboots: Uninstalled Crashplan and Java, then reboot after every step: Install Java, reboot, Install Crashplan without ‘run after install’ checked, reboot, run crashplan, wait several minutes until CPU and log writes calmed down, stop crashplan, reboot, run crashplan. I’m sure a lot of this was pointless, but other than the reboots I had already tried these steps before, and this was my ‘I might as well give it one last shot’ approach, I was surprised it worked. Hopefully someone else will find this useful.

    Reply
    1. Don Anderson's avatarDon Anderson

      Holy cow – That worked! A DS412 with the latest and greater DSM, Crashplan and Java with a reboot between each step as you mentioned above. Thank you so much, it’s been killing me that I’ve gone so long without an offsite backup.

      Reply
    2. Heisenberg's avatarHeisenberg

      Thank you scpotter for leading the way – with renewed confidence I took a leap of faith knowing that I could potentially screw up my backup workflow. I’m happy to report that it all went smoothly and I’m up and running with the DSM and java now updated by following your ‘reboot after every stage’ advice. Here’s my experience:

      My pre-update setup:

      Synology DS214
      DSM 5.0-4458 Update 1
      CrashPlan 3.6.3-0027
      Java SE Embedded 7 (1.7.0_51-0023)

      – –

      The update procedure:

      • Uninstall CrashPlan 3.6.3-0027 and Java SE Embedded 7 (1.7.0_51-0023).

      [REBOOT]

      • Update to latest DSM (5.0-4482, for me this was a 2-step update).

      [REBOOT]

      • Install Java SE Embedded 7 (1.7.0_55-0024).
      (NOTE: Prior to java install I had to download the relevant file from this page on Oracle.com (http://goo.gl/TWQ2qM) which in this case was ‘ejre-7u55-fcs-b13-linux-arm-vfp-sflt-client_headless-17_mar_2014.gz’ and place it in the Synology NAS shared ‘public’ folder – installation will not complete without it).

      [REBOOT]

      • Install CrashPlan 3.6.3-0027 (uncheck ‘run after install’).

      [REBOOT]

      • ‘Run’ CrashPlan 3.6.3-0027, wait a minute or so for CPU activity to settle then ‘stop’ CrashPlan.

      [REBOOT]

      • Check the Synology NAS ‘crashplan’ user account has at least ‘read’ permissions for the shared folders in your backup plan.

      • Run CrashPlan

      • On your computer (for me this is a mac) open the CrashPlan desktop client, you will have to sign in again.

      • Choose to ‘adopt’ computer, a list appears that should include your previous Synology NAS name, select this and Crashplan will sync with your existing backups.

      I hope this helps someone and thanks again to patters for great work and scpotter for an invaluable contribution.

      Kenny G

      Reply
      1. scpotter's avatarscpotter

        Glad I was able to help a few others out. To Patters: thanks for all your work putting the software together, the packages are fantastic.

  27. William's avatarWilliam

    Updated my DS212j (which had been running happily on DSM5 since it came out, with 7.0.55-0024 (patters) and CrashPlan 3.6.3-0027) to DSM 5.0-4482. Now CrashPlan stops after a few seconds. engine_error.log shows ” /volume1/@appstore/CrashPlan/bin/nice: /bin/java: No such file or directory “. How can I resolve this? And how can I avoid this kind of update hassle in future? TIA, William

    Reply
    1. William's avatarWilliam

      To answer my first question: I uninstalled then reinstalled Java, and now CrashPlan stays running. Would still welcome feedback on second question. I’ve had too much trouble for my liking, with updating CrashPlan/Java/DSM on my own diskstation and on those of my clients.

      Reply
      1. John B.'s avatarJohn B.

        The purpose of this excellent package is to provide a means to hugely simplify the installment of CrashPlan on your diskstation.
        What you need to know is that this setup, CP on Synology, is NOT officially supported by CP and you need to go into this setup with a mindset that reflects this.
        I’m crossing my fingers for you that you haven’t placed business clients in a position where they expect this to work smoothly, because that is setting yourself up for trouble!
        Expect problems when DSM, CP or Java is updated.

      2. William's avatarWilliam

        “Expect problems” is the part of your response which is useful to me, thank you.

        I have worked with CrashPlan on Synology for two years now. I have supported clients’ information systems for 25+ years. I am not unfamiliar with using unsupported configurations, where appropriate. You’ll note on re-reading my post that I didn’t whine “This is cr*p – Syno/patters should fix this” or somesuch.

        All I was looking for was feedback from the collective wisdom here, to help avoid update hassle (perhaps on reflection I should have said “reduce” – it’s entirely unrealistic to “avoid” update hassle altogether, of course). My assessment of postings here, especially over recent months, is that the CrashPlan/DSM/Java combo is more fragile than most unsupported combos I deal with, and that most worryingly, there is little pattern or consistency not only to the problems each update causes, but also to the resolutions – even for users on apparently identical setups. In most update situations, including unsupported, I would expect early implementers’ efforts to result in a consensus on how best to deploy and tidy up after each update; the less enthusiastic wait until the body count drops, then benefit from those efforts. That doesn’t seem to be happening here. Is that a fair assessment? (An assessment in which, please be clear, there is absolutely no criticism of anyone concerned.)

        The clients to which I have deployed CrashPlan on Synology are personal clients, for whom DiskStation backup is not critical. I would not deploy this combo to business backups.

      3. John B.'s avatarJohn B.

        Your two posts reveal nothing professional about you whatsoever. They are too short for that.
        In your first post you point to an issue with Java and yet only a few minutes later you post a solution that should have been tried before even firing off the first post (hmm… java not found? I better investigate closer,including removing and re-installing it to see if that solves the problem).
        I – personally, not everyone I’m sure – almost read your questions as statements. They seem to expect an answer instead of leading up to a discussion on how to solve your problem. Even ending your second post with a sentence reminiscent of an angry child, “I’ve had it up-to-here: fix this or else”; information that has no relevance to anyone.
        You gave off the impression of expecting to avoid update hassles with this setup and thus – all in all – painting a picture of someone who found this package, installed the software and now expected Patters to pick up the support bill.
        I my response offended you, so be it, it still stands – expect problems with a non-supported solution.
        Having said that, you need to stop all automatic upgrades (not sure if that’s even possible for CP) and only performing them manually on a non-critical system and then only after reading about the experience of other users. That way you let your ‘clients’ live in blissful ignorance until you have ironed out the upgrade process yourself.
        But of course, with your experience, you already know this.
        This blog provides an invaluable treasure trove of information but the format is not good. Patters has tried to summarize some of the information under the “Notes” heading at the top, but most of it is hidden away in individual posts and threads and is spread all over the place.

      4. DJ's avatarDJ

        …”I uninstalled then reinstalled Java, and now CrashPlan stays running.”…
        Thank you, this also worked for me!

  28. Dino's avatarDino

    unfortunately.. since the latest DSK upgrade my crashplan won’t keep on running. I have done the suggested resinstalls for the java and crashplan clients. I do see if the logs a repeated starting of crashplan for a few times until it sops. I have tried both java 7 & 8 too. I hope a resolution will come soon :)

    Reply
  29. daveS's avatardaveS

    I can’t get my client to connect to server. I am not running DSM 5.0 firewall so I am at a loss on why this connection is being refused. It appears the server (see netstat below) is listening on port 4243 but this is what I get when I telnet to server:

    telnet 192.168.1.122 4243
    Trying 192.168.1.122…
    telnet: connect to address 192.168.1.122: Connection refused
    telnet: Unable to connect to remote host

    On server I have the following running netstat…

    DiskStation> netstat -an |grep -E ‘(4243|4242)’
    tcp 0 0 0.0.0.0:4242 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:4243 0.0.0.0:* LISTEN

    Any help is greatly appreciated. I have searched exhaustively on this and a few others have same issue but I have not seen any resolutions. Thanks again.

    ds

    Reply
  30. Sven's avatarSven

    Hi patters, I have a question regarding the privileges of the “crashplanproe”-User which is created during the Installation. If I set the privileges for a folder on the Synology, in my understanding, this folder should not be avaiable to the backup process. But this doesn’t work. The CrashPlanPROe-daemon is running as “crashplanproe” but it is able to read files from folders the user crashplanproe hasn’t a privilege for reading or even more.
    DSM 5.0 and CrashPlanPROe-package 3.6.3-0027, Java 7u51.

    Reply
  31. msilano's avatarmsilano

    Just upgraded my DS412+ to DSM5, and upgraded Crashplan. Knock on wood, it appears to have worked flawlessly.

    Steps:

    1. Stop Crashplan
    2. Stop Java
    3. Upgrade DSM
    4. Install Java Manager
    5. Install Java 1.70_55
    6. Upgrade Crashplan
    7. Start CrashPlan
    8. Stop CrashPlan
    9. Start CrashPlan

    And it worked.

    Now, I had a drive go bad during the upgrade, so had to swap in a spare, but that was seemingly unrelated to Crashplan.

    Thanks again everyone for the help.

    -mike

    Reply
  32. b5b8d2's avatarb5b8d2

    I’ve been running Crashplan for a while now on my 412+ on DSM 4 and Java Manager 1.6 with zero issues but looking to upgrade sometime soon for some DSM 5 features.

    Does Crashplan with DSM 5 require Java 7 or something? I mean new releases of Java never work right so I guess I’m not real sure what’s the desire for everyone to try and run them?

    If there isn’t some requirement to run it, don’t! Problem solved!

    Reply
  33. Pingback: Linuxmint or Ubuntu: Crashplan backup using headless Synology NAS

  34. Steven's avatarSteven

    editing the syno_package.vars file says it is read only. Can’t change the java heap setting. I tried Sudo…but that command is not available on the synology. Any ideas how to edit that file?

    Reply
    1. patters's avatarpatters Post author

      If you log in via SSH as ‘root’ with the same credentials as the admin account you will have write access.

      Reply
    2. Shane's avatarShane

      Hi. SSH works. I like using this method it is a bit easier if you do not have a lot of command line/unix/linux expereince. I did post this a while back (Feb of this year). Thought it might be good to repost:

      Yes, there is an easy way to do that. I find that using portable apps is quick and easy, Goto portableapps.com and find WINSCP. Use it to login, using your root account, and browse to the location. Right click on the file and select EDIT. You are then using a Windows GUI editor rather than a command prompt and VI. It will prompt you to overwrite the file (needing admin rights), say yes and there you go. Open the file up to ensure that the change has been made. I’ve set my limit to 1024*3 (or 3072). I have 4 GB of ram in my 1512+ and 10 TB.

      Reply
      1. Steven's avatarSteven

        Ah, i found out why. I forgot to stop the crashplan service before trying to edit the file. After stopping the service, the file was not read only anymore and accepted my modifications :-) thank you for the help.

  35. Richard's avatarRichard

    Upgraded to DSM 5.0-4482 and Crashplan wasn’t running. Checked the error log and it showed that it couldn’t find /bin/java. Uninstalled Java7, downloaded jre55 and reinstalled Java7. Crashplan happily restarted after that.

    Reply
  36. Charlie's avatarCharlie

    Hi Guys, I’m back with some good news! It took me a couple of days of trial and error, but I’ve finally got it working again.

    My setup: DS 411+, upgrade to 2 GB (wondering if it might work with 4GB), latest DSM and Java 7 (patters). First, stop the crashplan app! I’ve used the portable WINSCP (on dropdown protocol choose SCP) to access the syno_package.vars (remember to login as root and use your admin password). Edit the following line:

    #USR_MAX_HEAP=512M (to the amount of RAM you’d like, but REMEMBER, remove the hashtag)

    In my case it looks like so:

    USR_MAX_HEAP=1024M (this will automatically update run.conf file)

    Start the Crashplan app and run the desktop app. That’s it! Good luck to all and I’ll try to report back and update on my progress…fingers crossed ; )

    Cheers!!!

    Reply
    1. xris's avatarxris

      Took me a moment to locate the file. To save others the trouble, it’s found at:

      /volume1/@appstore/CrashPlan/syno_package.vars
      (or whatever your “volume 1” is called)

      This fixes the “unable to connect to the local backup engine” error I started seeing once I let my NAS start backing itself up rather than just using it as a backup destination.

      Reply
    2. Mitchell's avatarMitchell

      Can I trouble you to send me some information on how to access the file? Is there a special way to access the NAS to find it? Thanks, Mitchell

      Reply
    1. patters's avatarpatters Post author

      Yes, annoyingly for me Google decided to cease Google Affiliates, and CrashPlan didn’t bother using another service like they said they would. So now I get nothing from CrashPlan sales unfortunately.

      Reply
  37. belnas's avatarbelnas

    Note to DS213j owners
    This setup works for me so far:

    DSM 5.0-4482
    Synology Java manager with 1.7.0_55
    Edited syno_package.vars to: USR_MAX_HEAP=400M

    Reply
  38. Marten's avatarMarten

    Apologies if this has been answered elsewhere but I couldn’t find it.. I upgraded to DSM 5 and crashplan disappeared, and even though I do have packages.pcloadletter.co.uk in the list of sources it doesn’t actually show up and I can’t install it again.

    (And no, it isn’t on my system either.)

    Where can I find the package file to install manually??

    Reply

Leave a reply to bruno Cancel reply