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. patters's avatarpatters Post author

      I just upgraded my DS111 to the 4.1beta and it’s still the same Linux version underneath so it should be fine. Mine’s an ARM CPU.

      Reply
      1. brunchto's avatarbrunchto

        ok, i’ve installed DSM4.1 beta on my DS1010+. there seems to be a problem with french specials characters like éà… All folders with thoses letters are ignored from the backup. in the crashplan client, when i try to select them, they are shown like files with a little diamond with ? instead of accents. seems to be an encoding problem somewhere but where :) ?

      2. Brunchto's avatarBrunchto

        Ok, i find in the synology wiki that locale must be reinitialized after dsm upgrade. I will try to understand how to do it. :)

      3. patters's avatarpatters Post author

        You just need to stop CrashPlan, uninstall Java and reinstall Java, which will fix the locale support.

  1. John's avatarJohn

    Hi. Is there any reason why the user home service needs to be enabled for CrashPlan? I would like to leave it disabled if possible…

    Reply
    1. patters's avatarpatters Post author

      Yes, CrashPlan stores settings in the user profile, and we need certain user-specific Java settings too (timezone). Without User Homes Service, the daemon user doesn’t have permission to write to the root homedir, which is the default if UHS is disabled.

      Reply
  2. Daniel's avatarDaniel

    Can I get a link to the CrashPlan spk file please? Unable to download from your repo.

    (Successfully downloaded and installed the Java spk you linked to earlier btw, thanks!)

    Reply
  3. Paris Pitts's avatarParis Pitts

    Looks like after an automatic upgrade to 1332824402322, the Crashplan service will not start from the Syno GUI…

    Reply
    1. patters's avatarpatters Post author

      Which version (CP, CP PRO, or CP PROe) are you running, and on which platform (ARM or Intel)? My ARM NAS is happily running CP 3.2.1 1332824401321. On some test Windows systems at work 2 out of 4 of them have died. They refuse to start CP at all. No log output. By installing Oracle’s Java manually and pointing the CrashPlanService.ini JRE path to the Oracle JRE I get this in service_error.log:

      java.lang.NoClassDefFoundError: com/jniwrapper/AutoDeleteParameter
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(Unknown Source)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$000(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: com.jniwrapper.AutoDeleteParameter
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 12 more

      Reply
      1. Charlie's avatarCharlie

        For me, I have a 1010+, 3GB ram. The actual service won’t start since the upgrade. The GUI simply cannot connect to the backup engine because of this. Any ideas?

      2. Paris Pitts's avatarParis Pitts

        Crash Plan Pro version 3.2.1 – Client machine is on a OSX box (10.7.4)
        Intel platform (DS1511+)
        DSM 4.0-2228

        FWIW – I did uninstall, and re-install using the DSM GUI; the OSX client could connect, but displayed a message that “crashplan was upgrading.” The log file from DSM GUi shows as below, which suggests that it upgrades crashplan then stops.

        I am fairly confident that CP is not running on the DS1511, but I was unclear on how to validate that from the command line.

        Thanks.

      3. patters's avatarpatters Post author

        I’m adapting my scripts to fix the updater to work on Synology, which is quite tricky. Nearly done, hopefully will have something for you to test tomorrow.

      4. patters's avatarpatters Post author

        It’s taking longer than I thought. Hopefully once I’ve cracked this though, it should allow other future pushed updates from Code 42. I have got the main logic working, but I’m having user permissions issues. Have to stop now, but I nearly have it solved.

      5. Charlie's avatarCharlie

        Hi Patters – any luck with this? Anything you need tested, etc. that I [we] can help with?

      6. Charlie's avatarCharlie

        Hi – any progress made on CP running on syno yet (since the update from Code42)? It’s been over a week and I am unable to run the service. Any updates would be appreciated.
        Best,
        Charlie-

      7. Charlie's avatarCharlie

        Hi Patters,
        I see in the change log that you have up to release 012 (understanding that 012 is for CP Proe). I tried un and re-installing from your repo and I am still only grabbing 010 (CrashPlan Pro).
        Am I not pulling the correct version? Is the 010 the reason why the engine cannot connect to the CP servers? At this point I am not even attempting to connect a client again and just get the service running.
        Thanks,
        Charlie-

      8. patters's avatarpatters Post author

        Yes 010 is the current one for PRO. That last change didn’t affect the normal and PRO packages so it wasn’t worth making everyone update for nothing. I’ll hopefully get that remaining issue sorted today. It’s quite a pain to test, because every time I make a change I need to install the package, wait 5 minutes for it to update and fail and then test. Also the script can only run once because then files have been moved and so on so it can’t be tested again without completely uninstalling and starting again.

  4. Simon's avatarSimon

    What is the maximum bandwith troughput you guys are getting? My max. is 650Kbps on a DS1010+ with a 7Mbit upload. Setting deduplication to minimal makes no difference.

    Reply
  5. rob's avatarrob

    I am thinking of buying the ds212+ (512mb) however crashplan …. crashes … on my webserver with 512mb due to too much memory consumption. How is this handled on the ds212+
    Does it work wll on this one?

    Reply
  6. senriquez's avatarsenriquez

    I have a Synology DS411j and whenever I try to run CrashPlan Pro on it, it always pops up the box with the message:
    “Wait a few seconds, then stop and restart the package to allow desktop client connections”.

    The package will go to a “running” state temporarily and then it will change its status to “stopped”. Am I doing something wrong? I’ve installed the Embedded 6 Java without an issue. I’m not sure what steps to take next. Any help would be greatly appreciated.

    Reply
    1. patters's avatarpatters Post author

      No, that’s normal right now I’m afraid. Code42 Software are pushing an update to the client which breaks things on Synology. I hope to have it fixed tomorrow, it’s nearly done.

      Reply
      1. Darrin's avatarDarrin

        Hi, any update on the fix, noticed CrashPlan stopped working about a week ago on my DS212j, service is running but cant connect with the GUI nor are the backups running. I noticed that port 4242 is not listening if I run netstat.

      2. patters's avatarpatters Post author

        I assume you’re running CrashPlan PRO? Sorry, been busy getting Serviio 1.0 released. Hopefully will look at this tonight.

      3. JJ's avatarJJ

        Hey patters, just wondering if you’ve had a chance to fix this CrashPlan PRO issue yet? Thanks!

      4. May's avatarMay

        Hi,

        I have the same problem here, with the normal version ( not Pro ). and i’m on DS411..
        If you hanve the answer it would be great

      5. May's avatarMay

        In fact when i launch it, it says “Wait a few seconds, then stop and restart the package to allow desktop client connections.” but never it launch :s

  7. Nick Tones's avatarNick Tones

    After uninstalling your crashplan package (which is great, crashplan just doesn’t fit my needs) I everytime the DS restarts it restores the crashplan share.

    Any ideas how I can stop this happening?

    Reply
  8. Maikel's avatarMaikel

    I have installed the package on my Synology, but for some reason the package won’t start from the Package Center. When I try to run it, it just refreshes and the status is still ‘stopped’.
    I can run CrashPlan from a SSH-session, but then it only runs in this session and closes when I end the session.

    The logs didn’t tell me anything, so I have no idea where to look.

    Reply
  9. Joss's avatarJoss

    thank for you work on this good aplication. I instaled crashplan on my DS212j and installation went well. I can not run it from “start” menu. Icon is not visible. What have I done wrong? Thank you. Dalibor

    Reply
  10. colin's avatarcolin

    So I have installed everything without a hitch on a new DS1812+ running DSM 4.0-2219. Package and java installed easy. I stopped and restarted the package on the NAS. Now I am trying to connect the client to the NAS to administer it from a separate PC. Changed the ip address in ui.properties no problem.

    But whenever I run Crashplan (Ver 3.2.1) it just has me configure the PC taht crashplan is installed on. If I disable the Crashplan Backup Service and try to run the client, I get a message on the splash page (while the program is loading) that it is unable to connect to the backup engine…

    I’d appreciate any thoughts on how to fix this.
    Ohh, and I can’t thank you enough for all of you guys working on this to help me out! Love your work!

    EDIT – I am an idiot and did not remove the ‘#’ in ui.properties. thanks again for all the hard work!

    Reply
  11. Andrew's avatarAndrew

    Thanks for the great package. Installed on my RS212 w/256MB RAM no problems. Okay, there were a few problems, but this was becuase I didn’t RTFM :-). The RS212 has been stable since I purchased it, but I’ve experienced two power failures since I installed Java and Crashplan in the past 24 hrs. My backup is approx. 40GB. Anyone experience this issue, or have any ideas as to how I can troubleshoot?

    Reply
      1. Andrew's avatarAndrew

        Hi Patters, I can’t be sure, hence why I wondered if anyone had any troubleshooting tips e.g. any log files I should look at etc. The NAS has been trouble free for 9 months, with no unexpected power outages. No other electronic equipment experienced a power outage. Two power outages within 5 hours after installing java and Crashplan is enough IMHO to warrant me looking into it. I stopped the Crashplan service after the second power outage and no incidents have occurred for the past 14 hours. Should I look at CPU or memory logs to see if the unit has been maxed out by the backup process? Cheers, Andrew

      2. Andrew's avatarAndrew

        Update: stopped crashplan and experienced two further unexpected shutdowns. Motherboard is fried courtesy of the PSU, and will be getting a replacement form vendor next week. Just wanted to mention that my issues were NOT related to crashplan. When I get my replacement unit, crashplan will be the first thing I enable. It saved me as I had a full backup! Cheers Patters! I’ll be clicking on your affiliate link.

    1. patters's avatarpatters Post author

      Apparently Mountain Lion will by default prevent you running code that wasn’t obtained from the App Store. Have you tried going to System Prefs > Security & Privacy > General > Allow Applications downloaded from: Anywhere

      Reply
    2. Carrie's avatarCarrie

      I’m suddenly getting this error too when trying to backup with CrashPlan from my ds212j and I haven’t updated to Mountain Lion yet, still on Lion. Any ideas?

      Reply
    1. patters's avatarpatters Post author

      It is, but it seems that the web host has been put on a black list that a few ISPs are enforcing. I’m likely to move it. For now you should be able to find a direct link to the package in the recent comments (same for the Java package).

      Reply
  12. Marten's avatarMarten

    One question: Is there some way to control crashplan by linux/ssh commandline?

    It would specifically be very useful if I can run “/usr/local/bin/crashplanCLI.sh pause” and “… resume” without having to somehow tunnel a headless client to my NAS (which is deep inside a firewalled area)

    Reply
    1. patters's avatarpatters Post author

      Yes there is – you can use the Package Center script though you will need to define a couple of variables first which will be different for the different flavours of the package (CP, CP PRO, CP PROe):
      #package names are CrashPlan, CrashPlanPRO, CrashPlanPROe
      export SYNOPKG_PKGNAME=CrashPlan
      export SYNOPKG_PKGDEST=/volume1/@appstore/$SYNOPKG_PKGNAME
      #to start
      /var/packages/$SYNOPKG_PKGNAME/scripts/start-stop-status start
      #to stop
      /var/packages/$SYNOPKG_PKGNAME/scripts/start-stop-status stop

      Reply
  13. JJ's avatarJJ

    Hey patters,

    Should this be working for CrashplanPRO now? I still can’t seem to get it to start. Thanks!

    Reply
      1. JJ's avatarJJ

        Thanks. Sorry, don’t mean to complain, just that I’m getting warning emails every few days about not having backed up and I’m a bit worried. Thanks patters

  14. Jax's avatarJax

    Firstly, thanks for all your help here Patters – much appreciated.

    – I have a DS1812+ (8 bay intel NAS).
    – I have approx 1TB of data on my NAS (HD video files between 200MB to 4.2G per file)
    – My upload average = 110kb/s (download average = 1400 kb/s)

    2 Questions:

    1. Is crashplan cloud backup viable under my given upload stats? (pretty miserable)
    2. All my data is stored on my NAS, so I was looking for crashplan (locally) to backup my NAS to an external eSATA disk.

    *Note I have been using the “local backup” functionality within the NAS, but I have found it very unreliable for my work so have been searching for an alternative… but something that can run as a “package” on the Synology NAS itself.

    Any ideas?

    Tks

    Reply
  15. Jax's avatarJax

    Oops – and my 2nd question was:

    Is there a synology “package” that can backup my NAS to a nas-attached esata external drive? (ie without the need for a pc or mac).

    Im just not really happy with the Synology “local backup” product (or the “time backup” package)

    Reply
    1. patters's avatarpatters Post author

      I think your upstream bandwidth is possibly too low for that to be viable (unless you don’t mind months of seeding and as long as the data is fairly static).

      You can use CrashPlan to backup to a local folder for free though, so using an eSATA drive would be fine. You get all the same advantages (compression, de-dupe, block level change tracking – so huge files that are modified are not re-synced, only the changed parts).

      Reply
  16. Jax's avatarJax

    Hi Patters, thanks for your feedback.

    I know in running crashplan on my local computer I can backup to an attached eSATA disk.

    However, if no pc/mac is switched on – and ONLY the Synology NAS is turned on… can the NAS ITSELF initiate a backup to an esata disk that is directly connected to it? (ie through an installed package?)

    Reply
    1. patters's avatarpatters Post author

      Yes it can, that was what I meant. It will be a mounted volume and CrashPlan supports backup to local volumes. You would manage the NAS instance of CrashPlan from a client on another computer. You will also need to stop the CrashPlan service before removing the eSATA disk, and only run CP when it’s attached.

      Reply
  17. Jax's avatarJax

    Awesome, thanks again for that! :)

    On my Synology I’ve installed:

    1. “Java SE for Embedded 6” package (not running)
    2. “Crashplan” package (running).

    Can’t seem to see it to manage from my computer client (which Im guessing is due to the Java not running).

    I will persist!!

    Reply
    1. patters's avatarpatters Post author

      Java doesn’t run. That’s normal – it’s not a service. You need to stop and start the CrashPlan service on the NAS at least once after you first install it. Then modify C:\Program Files\CrashPlan\conf\ui.properties on your PC as mentioned in the blog post. Then launch that PC CrashPlan client again.

      Reply
  18. Jax's avatarJax

    Yep did stop/start. Im on a mac (i do have a pc also). is there an equivalent file to edit on the mac (or should I install CP on the pc and edit?)

    Reply
  19. Jax's avatarJax

    Patters, thanks so much! :) I got my Syno 1812+ working with crashplan – it’s currently backing up 1tb to the mounted external eSATA drive.

    Under “computers” tab it has my Disk Station listed as the source.
    Under “Folders” tab in the “available folders” I browsed to my mounted external drive.
    I set the CPU percent to 100% in both instances and made sure network limit = none.

    It reports “2 days remaining”.

    – Its not performing this over the network is it?

    – Im assuming the reason its taking so long to backup 1TB is because of the encryption and compression involved? (ie not a 1:1 backup?)

    Reply
    1. patters's avatarpatters Post author

      No, it won’t be over the network – only on the syno. You can disable dedupe and compression in Settings > Backup > Advanced Settings > Configure which may speed things up if you’re backing up video for instance.

      Reply
      1. Jax's avatarJax

        Thats a very good suggestion actually Patters, cheers for that!

        The local backup is already at 25% complete – Im guessing i can change those settings “on the fly”? (ie how will that affect the already running backup?)

        Ill check it out though, thanks again and must praise you for the great work.

        FYI – I just got off the phone to a Crashplan sub hosting service (in Australia) they mentioned Crashplan WILL be developing an officially supported pkg for Synology NAS. I guess its just a matter of when. Might even be worth encouraging people in here to request this development from Crashplan.

        Crashplan should really recognise your efforts here Patters, its been such a benefit to the community. But from one small fish… thank you!

      2. Jax's avatarJax

        And I most likely will sign up for Crashplan + after the 30 days are up. I will most definitely use your affiliate link (which Im trying to find as i type) :)

  20. senriquez's avatarsenriquez

    Does this mean that CrashPlan is working again or is there still a problem in trying to start CrashPlan Pro on the NAS? Sorry, I’m just a bit confused. Should I reload the CrashPlan Pro client?

    Reply
      1. senriquez's avatarsenriquez

        Oh, sorry. I was getting excited. Thanks for looking into it though. It must be a bugger of a problem. Thanks

    1. Jax's avatarJax

      Yeah sorry, to confirm i have a CP+ account so using standard edition. All my computers work from the one NAS, which then backs up to the cloud (and to an external drive).

      Reply
      1. patters's avatarpatters Post author

        Good news everyone. I managed to get update handling of the 1331787601320 to 1332824402322 update (3.2 -> 3.2.1) working after many hours of careful testing (see the new screenshot further up the page). Anyway, it’s kind of redundant now because I saw that Code 42 do now offer a download package of CP PRO 3.2.1 (which wasn’t available for some time after the update appeared). So CP PRO will be working once more if you upgrade to my latest package version through Package Center.

        There is also a sporting chance that future updates will also work, though they may require minor adjustments to my scripts. At least I fully understand how the updates work now.

      2. senriquez's avatarsenriquez

        Perhaps I’m doing something wrong but I have uninstalled the reinstalled the client on my Synology 411j and it continues to do the same thing no matter how many times that I try to start the service. It will run for a few seconds sometimes and then stop again. I don’t know how to tell if I am running the correct version, but I assume that it is.

      3. Charlie Pendleton's avatarCharlie Pendleton

        Hi Patters – Awesome! CPpro is finally staying running on my DS1010+. I reinstalled the client, start and stopped the service a couple times and it continues to run – yeay.
        However, it conked out when I had (and have) 1.1TB already backed up. I cannot see how to inherit the existing backup set so I don’t have to start from scratch again. Any ideas?

        Best,
        Charlie-

      4. Charlie's avatarCharlie

        Patters,
        First, donation sent in thanks for all you hard work on this. I read the link about the adopting a backup set and apparently the .identity flag is set somewhere, Is this on the syno since it is running in headless mode or on the client computer that is controlling it do you know?
        Best,
        Charlie-

      5. patters's avatarpatters Post author

        Thanks Charlie, much appreciated. So I take it that the client isn’t offering the adopt option in the GUI then? It does with normal CP, but I can’t test with CP PRO because I don’t have an account (and it seems to be US only).

        The identity GUID is stored in the text file /volume1/homes/crashplanpro/.crashplan/.identity
        I think you might be able to get the GUID of your existing backup set from CrashPlan Central. If you edit the .identity file, you’ll also need to change the ownership back afterwards, using:
        chown -R crashplanpro /volume1/homes/crashplan

      6. Charlie's avatarCharlie

        Thanks Patters. Apparently there is an issue on the CPpro website and it is throwing an error when I attempt to access my user (me). I submitted a ticket to them and will keep you posted as to the resolution so you know for future.
        Best,
        Charlie-

      7. Charlie's avatarCharlie

        Update to the GUID. You were correct Patters. I called tech support and the issues on their website are noted but not related. The tech had me double-click on the CPpro icon in the upper right-hand corner which brought up a command line (never knew). He then gave me the 16-digit guid of my backup set. It shut itself down and forced me to log back in – then it started scanning the backup set – all good – and much appreciated.
        Best,
        Charlie-

  21. Scrantic's avatarScrantic

    Since Upgrading to the latest version of Crash plan on my Syno 1511 the client runs if I manually press run in the package centre but it doesn’t start automatically any more.

    Any ideas/tips where to look?

    Reply
    1. scrantic's avatarscrantic

      To make things worse because I’m in Australia now if I uninstall/reinstall crashplan and I try to readopt my account I cant I will be forced to upload to the AU crashplan location again my entire backup…

      Reply
      1. Aaron's avatarAaron

        I had the same problem when I upgraded (I have also moved to Australia since originally signing up). However, I was able to fix it by following these steps:

        1. Ensure you have the new CrashPlan installed
        2. Stop and start it a few times to get everything working
        3. Stop CrashPlan and open up the \volume1\homes\crashplan\.crashplan\.identity file
        4. Log into you account on CrashPlan’s website and go to Computers and then select your computer that does adopt. At the top there should be a COMPUTER GUID number.
        5. Copy past the computer guid number into the .identity file, replacing the newly generated one
        6. Restart CrashPlan service
        7. Log into CrashPlan client, enter your username and password
        8. Tada, it is the old client, with all the settings and everything!

  22. Erik's avatarErik

    Thanks patters for this great package (donation is on it’s way). I have installed the headless client and it seems to work fine. There is only one strange problem. When I connect from my iMac to the headless client I can select directories for backup. However, when I select the .Maildir in the homes directories the CrashPlan software on my iMac says these directories have a size of 0 bytes. It then backups only a empty .Maildir to CrashPlan central. Any idea what is going on?

    Reply
    1. patters's avatarpatters Post author

      Thank you for the donation Erik. I don’t know for sure, but it’s likely that the mail is stored in a database that is locked open. Most backup programs will struggle to backup open databases unless they use specific API functionality to do so. CrashPlan does not support this apparently. It may be possible to schedule some kind of AppleScript to periodically export your mail database to a flat file which CrashPlan could then pick up.

      Reply
      1. Erik's avatarErik

        Hi Patters, I found a solution. I let my DS409 backup all .Maildirs and then let Crashplan backup this DiskStation backup. It doesn’t have problems backing up the backed up .Maildir directories.

  23. senriquez's avatarsenriquez

    I must be doing something incorrect because I still cannot get CP Pro to run on my NAS (411j) without stopping every time. Apparently I’m doing something incorrectly but I have removed and reinstalled the package several times with the same outcome. Does anyone have any ideas on what I may be doing incorrectly?

    Reply
    1. senriquez's avatarsenriquez

      Any ideas on this??? Anyone? It’s just extremely frustrating that it seems to be working for others after corrections and I am getting the same results. I don’t know what to do next other than just give up on the whole thing and admit defeat.

      Reply
      1. senriquez's avatarsenriquez

        It was a bit painful with several reboots and uninstalling and reinstalling Java several times as well as encountering errors that packages were begin configured but I was finally able to reinstall Java 6 as well as CrashPlan successfully. I was also able to successfully begin the backup process. Thanks for the help!

  24. Samy RABIH's avatarSamy RABIH

    Hi
    I tried to install Crashplan using the Synology tutorial (“Setting up a headless client”) and during my Google search, I found your package : thanks for all you have done for community, the ability to have Crashplan working on my synology is great ! (although, it didn’t work when I tried to install Crashplan from shell using the tutorial I mentioned, so your package saved my life :)

    But I encounter a little problem, and would like to know if I’m the only one : despite of broadband connection (about 50mbps in upload), the data transfer from my DS211 to Crashplan Central is very slow (about 1Mbps)

    I tested on Crashplan Desktop on my computer (on the same LAN) and the speed was good, so it is not Crashplan related (or I think so).

    The speed is slow either when it backups large files or small text files.

    I tried to disable the encryption and compression, to have more speed : the result is the same.

    Did you experience this kind of problem ?

    Thanks

    Reply
  25. Ron's avatarRon

    Thank you very much for this great package.
    I only had a slight issue with needing to get the April version of Java 6 (which I got from http://tinyurl.com/java6u32embed), but other than that it all worked perfectly.

    A donation has been sent your way.

    Thanks again.

    Reply
    1. Ron's avatarRon

      Following on from my prior post above, I’ve noticed a slight glitch, but it’s nothing major.
      Now that I’ve installed Java 6, by following your instructions, I’ve noticed that File Station now gives me a pop-up warning asking that I update Java.
      The message is easy enough to dismiss, but it seems to affect File Station such that it no longer displays my local workstation drive on the bottom half of the File Station screen.
      I can still upload and download to/from File Station by using the upload and download buttons, but I can no longer drag and drop since my local workstation drives no longer appear on the bottom.

      Reply
      1. Ron's avatarRon

        Thanks patters, you might be correct in suggesting that it could be a client-side Java issue.

        I’ve recently finished doing a fresh installation of Mountain Lion on my Mac.
        I had previously run Lion and upgraded to Mountain Lion.

        It turns out that Mountain Lion disables Java by default.
        I therefore manually installed Java (type “java” into a Terminal prompt and then click “Install”), and rebooted the Mac.
        I can now confirm that I’m running (“java -version”):
        Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
        Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)

        I’ve tried using File Station with Chrome, Safari and Firefox, and none of them display the local drive section at the bottom.
        Chrome asked me if I wanted to allow Java to run, and I said to always allow it on this site.
        I rebooted a second time, just to be sure, but it didn’t help.

        Oh well, it must be some security thing on Mountain Lion which prevents it from working.
        Not to worry…

      2. Ron's avatarRon

        One last update.
        It seems that installing Java on Mac only gets you half way there.
        I ended up going to another site which used a Java plug-in, and this time I was asked to click on the link in order to enable the Jave SE plug-in.
        I clicked on that link, re-started by browser, and the plug-in started working.

        I then fired up File Station, and now I’ve got normal functionality again, in terms of my local drive being displayed on the bottom of the window.

        So this issue was definitely a client-side issue.

        Thanks for the pointer.

  26. Colin's avatarColin

    A feature enhancement would be to allow the service to run as root instead of forcing it to the crashplan(pro|e)? user. The reason for this is that the backup job should have unfettered access to the filesystem to at least read without having to explicitly grant the service user to a group that has access to the files. [In fact, using root should be the default behavior – but that is my two cents]. Appreciate the package development. Thanks a lot. It has saved me many hours after the last upgrade with crashplanpro failed.

    Reply
    1. patters's avatarpatters Post author

      Weirdly, it does seem to have root access anyway. Not sure how, but maybe that’s something to do with the JNA library (Java Native Access).

      Reply
  27. Pingback: Mein NAS: Die eigene Cloud, zu Hause. — webermartin.net/blog

  28. Marcel's avatarMarcel

    I have installed Java SE for Embedded 7 and Crashplan on my Synology DS409. I have restarted Crashplan in DSM but Java is not starting. How should I be able to configure Crashplan?

    Reply
      1. Marcel's avatarMarcel

        I have read the instruction but couldn’t find a solution for Java. I have a DS409+ with Freescale MPC8533 PPC Processor, could this be the problem?

      2. patters's avatarpatters Post author

        That won’t work I’m afraid. Java won’t run on the PPC synos because they have a version of glibc that’s too old.

  29. svar's avatarsvar

    Hi Patters :)
    Does the old versions exist as manual packages or something?
    Planing to install CPPe for an customer but the CPPe provider we use still use the old 2010 versions so cant use the new client.

    Reply
  30. Greg's avatarGreg

    Installed the package.. says it is running and the log says it started (yes restarted service after install). Put the IP in ui.properties on the client but it says it can’t connect. Client logs say it is timing out trying to connect (to the correct IP). I have no firewall enabled

    Reply
    1. Gerrald's avatarGerrald

      Very similar problem on my site, started about 2-3 weeks ago. I just tried to fix this but to no avail. Anybody an idea?

      Reply
    2. joe.selway@compnow.com.au's avatarjoe.selway@compnow.com.au

      You have to stop/start the CrashPlan package a minute or two after installing before it will accept connections on 4243. Also confirm you have uncommented (deleted #) the config line where you have entered the IP.

      Reply
      1. Greg's avatarGreg

        I tried restarting after a couple of minutes. It’s been down for a couple days and started it up and I still see the same behaviour. If I try to telnet to port 4243 per the page on the crashplan site I am unable to connect. If I do a netstat -na from the NAS box it says nothing is listening on 4243.

      2. Gerrald's avatarGerrald

        I have a slightly other problem as Greg – will comment as soon as Greg’s problem is solved to prevent hijacking his thread.

  31. Jim's avatarJim

    Ok running in to big issues, I saw that there was an update for the Java 7 package so i decided to upgrade. I did not shut down crash plan before performing the upgrade, and it crashed so i had to uninstall it completely. Then when i tried to re-install Java 7 it was looking for the installer on the root of / i managed to get it copied to that that location and then it installed.

    I then tried to start crash plan and it would not start, so i uninstalled crash plan and re-installed it, now i get an error message when i am trying to install it that says:

    Failed to install the Package.
    Java is not installed or not properly configured. The Java binary could not be located. Download and install the Java Synology package from http://wp.me/pVshC-z5

    what do i do about this? Java is installed as far as i can tell.

    Reply
    1. patters's avatarpatters Post author

      You probably don’t have a ‘public’ shared folder if it was looking for the file in /
      Create that and it should be fine.

      Reply
      1. Jim's avatarJim

        I did have the share, and i have given ever user and group on my system access to it, i have also removed and recreated it along with total access, it is the strangest thing

      2. Jim's avatarJim

        I have also tried removing everything and re installing it. it’s like something is refusing to be removed or installed and it is causing everything else to choke. i have rebooted sevral times as well

      3. Jim's avatarJim

        Ok i upgraded my system to DSM 4.1 and then tried to install java again and now it is telling me that it was expecting the file to be on / and not /public.

        i am using a DS212+ so it is looking for the ARMv5 Linux headless. in the mean time i will try removing my public folder and recreating it.

      4. Jim's avatarJim

        I think i should give you the full context of the message:

        Failed to install the package

        I was expecting the file /ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz. Please agree to the oracle licence at http://tinyurl.com/java7u6embed, then download the ARMv5 Linux – Headless package and place it in the Public shared folder on your NAS. this download cannotbe automated even if displaying a pagage EULA could potentially cover the leagal aspect, because files hosted on Oracle’s server are protected by a session cookie requiring a Javascript enabled browser

      5. Jim's avatarJim

        ok so hows this for dumb i removed my public folder and put it in a different volume, and the Java installed without a hicup, then CrashPlan went back in normally as well. i do’t get it… but its working again.

  32. Jax's avatarJax

    Hi Patters, I have the “update” button on both crashplan+ and Java SE for Emb6. If I stop the crashplan+ service, is it a simple matter of just hitting “update” on both packages? (little confused whether the “update” button will break crashplan+ on my NAS) Or do I need to install manually?

    Reply
  33. NY's avatarNY

    Hello !

    Thanks for this package, it is awesome.
    I have realized that my crash plan package was not restarting automatically after a reboot of the disk station. i have to click run after each reboot.

    Is there a way to automate the restart after the reboot ?

    thanks in advance !

    Reply
    1. Flavio's avatarFlavio

      The same for me, I have tried looking at other posts but could not figure it out.
      Patters, Please advice.

      Thanks!

      Reply
      1. patters's avatarpatters Post author

        I don’t have this issue I’m afraid so I can’t troubleshoot. Some other people have reported the same thing with Serviio too. Are you on Intel or ARM, and which DSM version exactly?

      2. Flavio's avatarFlavio

        Mine is the DS411+ so it is an Intel one. and running on DSM 4.0-2198.
        Note: just to let you know that I’m going to buy this week a Crashplan + account using your link, is it guaranted that you will receive your portion?

    1. Marten's avatarMarten

      Found it myself:
      /volume1/@appstore/CrashPlan/bin/CrashPlanEngine stop

      (assuming of course you installed CP on /volume1)

      Reply
      1. patters's avatarpatters Post author

        I wouldn’t recommend doing that, because you’ll be running as root so it won’t read your config (which is stored in the crashplan daemon user home folder).
        If you want to script the start and stop, I would use this method which will copy the behaviour of using the Package Center GUI:
        #package names are CrashPlan, CrashPlanPRO, CrashPlanPROe
        export SYNOPKG_PKGNAME=CrashPlan
        export SYNOPKG_PKGDEST=/volume1/@appstore/$SYNOPKG_PKGNAME
        #to start
        /var/packages/$SYNOPKG_PKGNAME/scripts/start-stop-status start
        touch /var/packages/$SYNOPKG_PKGNAME/enabled
        #to stop
        /var/packages/$SYNOPKG_PKGNAME/scripts/start-stop-status stop
        rm /var/packages/$SYNOPKG_PKGNAME/enabled

  34. Marcus's avatarMarcus

    I recently bought a DS412+ as a replacement for my old 1 bay model and upgraded it to 4 GB of RAM. It is currently running DSM 4.1 beta without any problems so far. I installed Crasplan which worked fine for a while (without backing up any files) but now it looks like it is causing issues. I noticed that shortly after rebooting the DS412+ the sys load is going way up, 20 or even above 30 (forgive me, I’m not experienced with the values, but I think anything above 10 on a DS412+ is not ok). Shortly thereafter the box freezes. My SSH is not responding anymore and none of the services are working as well. The only thing I can do is cut power and reboot. But stopping all services and the starting them again one at a time I think it is really caused by Crashplan. Has anyone seen that bevor? What can I do? I love Crashplan on my desktop and would like to extend it to my DS412+ as well, but I’m kind of stuck here…

    Reply
    1. Chris's avatarChris

      I’m facing problems with DSM 4.1 Beta as well.
      Installation and startup of Java/CrashPlan package does not cause any problems and even scanning the files works fine.

      But when it comes to actual uploading it seems like the package somehow crashes and the connection to the local Client used for configuration crashes.

      After a restart, Synchronizing starts over again…. ):

      Does anyone know how to solve the issue – I really love the package and can’t wait to get it running again!

      Thanks in advance

      Reply
      1. patters's avatarpatters Post author

        I’m running DSM 4.1 beta too with no issues, so that’s not a problem in itself. If you’ve been running starting the package manually from the command line while logged in to ssh as root you could get this kind of issue. In general always use Package Center to stop/start.

      2. Chris's avatarChris

        Hi!

        Thanks for the quick response!
        Unfortunately that can’t be the reason for the problem, as I’ve never started the service from command line.
        There had been a manual installation according to the Synology-wiki before, can that cause the problem, even if it had been uninstalled?

        Thanks again!

    2. Marcus's avatarMarcus

      I never started the package using the shell. The only thing I did was trying to stop it asap after reboot since I suspected Crashplan to freeze up my Diskstation. I will leave Crashplan stopped for a day or so and see what happens. Any suggestion on what to try if after starting Crashplan the box freezes up again? Are there any known issues which can be caused by a raid resync or filesystem expansion? Because this is what I’ve been doing the past couple of days (adding disks to get more space)

      Reply
      1. Christian's avatarChristian

        Hi patters!

        Sorry for bothering you again, but I’m really desperate now.
        After completly uninstalling the old setup according to your manual and installing the packages, uninstalling the packages and reinstalling them again, I still can’t find a solution for the problem.

        The weird thing is, that installation runs, I can acces CrashPlan via the client and also the Scanning of the folders runs well, but when it comes to file transfer the problems begin and the client states that it has lost connection to the backup machine after some minutes.

        The log of your CrashPlan package shows the following:
        01:40 pm CrashPlan started
        01:40 pm Backup scheduled to always run
        01:40 pm [Default] Starting backup to CrashPlan Central; 88.001 files (136.90GB) …
        01:43 pm CrashPlan started
        01:43 pm Backup scheduled to always run
        01:43 pm [Default] Starting backup to CrashPlan Central; 88.001 files (136.90GB) …
        01:46 pm CrashPlan started
        01:46 pm Backup scheduled to always run
        01:46 pm [Default] Starting backup to CrashPlan Central; 88.001 files (136.90GB) …
        01:49 pm CrashPlan started
        01:49 pm Backup scheduled to always run
        01:49 pm [Default] Starting backup to CrashPlan Central; 88.001 files (136.90GB) …

        So it seems as Crashplan crashes and starts over and over again without backing up any files….

        I would be really thankful for any hint!!
        Best Regards
        Christian

      2. patters's avatarpatters Post author

        It seems to do that when the Java heap size is too small for the quantity of files you’re backing up. This was discovered quite early on in these comments, and Code 42’s support response was to allocate more RAM to CrashPlan. You can do this by editing the file /volume1/@appstore/CrashPlan/syno_package.vars

      3. Christian's avatarChristian

        Thank you so much!
        Adjusting the heap size solved my problems!

        Thanks again for the support and your wonderful package!

      4. patters's avatarpatters Post author

        No problem – be aware though that your syno may page to disk a fair bit, worsening performance if you make that heap size bigger than the amount of physical RAM – which is why for anything over 100GB or so you probably ought to buy an Intel syno (explained in the notes on this page).

      5. Marcus's avatarMarcus

        Update: Crashplan is working now and happily uploading to the cloud. I don’t know why it kept on freezing my machine (which happened several times after rebooting) but it stopped doing that. Very happy :-)

  35. Charles's avatarCharles

    This is a wonderful package. Thanks for the hard work putting it together. I really helps linus newbies like me.

    I need to increase memory allocation from 512 to 1024 for my configuration. I tried to edit the syno_package.vars after telnet-ing in as admin. It looks like I don’t have permission to edit the file.

    What user account should I use to login to edit the file?

    Thanks.

    Reply
    1. Charles's avatarCharles

      Nevermind, i figured it out. For anyone who may need help with the same thing. I had to log in as root and not admin.

      thanks again for the great work with the package.

      Reply
  36. Daniel Fischer's avatarDaniel Fischer

    For some reason I am getting Destination unavailable – backup location is not accessible when I try to backup to my Synology from another computer.

    I notice that it’s bound at 192.168.0.185 on the box. Typically I connect via 192.168.0.187.

    Could that be related? Is it something else? It sees it on the App from both computers so I’m not sure what to do.

    Reply
  37. pitcher's avatarpitcher

    Hello,
    i have a security-problem with the package.

    I want to give the deamon crashplan-user the ability to backup some folders without giving acces to the groep “users” or “others” in DSM!
    I have tried different options but without any result!

    How can i fix this??

    Reply
    1. patters's avatarpatters Post author

      I think CrashPlan somehow gets access to everything anyway, regardless of daemon user permissions, even though you can see the java process is running as the crashplan user and not root.

      Reply

Leave a reply to Gerrald Cancel reply