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. Sam's avatarSam

    Ugh. I just had a double disk crash and lost my volume completely (I had 1 disk redundancy but not 2).
    Luckily its all backed up on Crashplan! But…….all of my applications were corrupted and all had to be repaired. Crashplan has disappeared. Cant see it anywhere. Its not available to re-download in the package store.
    I assume something got corrupted and my NAS is confused. How do I do a manual download and install to get it back again (and get my 800GB of data back!).

    Reply
  2. Singularity's avatarSingularity

    And they changed it once again! Anyone login to their NAS today and see how everything changed? Right now it doesn’t know that I have 3 years left on my subscription or any of my folders on my NAS… Hence the reason why I’m uploading to iDrive right now…

    Sigh..

    CrashPlan you could have been great, but instead you made it a PITA which sucks..

    Reply
  3. Robbert Marrink's avatarRobbert Marrink

    I gave Crashplan another try today, based on the new information and instructions. Up and running again, very nice. It is a better backup solution compared to iDrive in my opinion. Thank you Patters for taking the time to fix the issue and inform us. I really appreciate it!

    Reply
  4. tuxerr's avatartuxerr

    Yesterday everything seemed to be back in order. But today when I started the client on my computer it stopped at the splash screen with the message “Cant connect to the backup engine, do you want to retry yes/no”. Logging into to the crashplan web/restore I can see the backup have bee running. Checking all settings in the ui files and guid on the synology all seems to be in order. Any ideas what I can try to get the connection back ?

    Reply
    1. tuxerr's avatartuxerr

      Today the client and synology connect, and indicating the backup is running just fine :-).
      Not sure why I got the issue yesterday.

      Reply
  5. scontrerasStefaan's avatarscontrerasStefaan

    Was able to upgrade to 4.4.1 and get the OSX app to connect to my NAS, but looks like I lost my catalog. The app on OSX says: Last Backup: Initial Backup not completed. To Do: 0MB, Completed 0MB. How can I pickup my catalog again?

    Reply
  6. Stanislav's avatarStanislav

    I just wanted to add my mistake I made. I followed all the comments made by patters and all the other helpful people but I never managed to get the headless client working. And then I realized that I installed CrashPlan for ALL users on my Mac, which means, that the .ui_info file is not only under /User/Library/Application Support/Crashplan but of course (as I had installed it for all users) in /Library/Application Support/Crashplan which means NOT in my home directory. After I edited this file it worked!!! Finally!!!

    Maybe you all now shake your heads on my stupidity but maybe there are some others guys like me in the world outside who are just missing this final advice.

    Thank you patters for all your work. PayPal is coming.

    Reply
    1. GeeWhiz's avatarGeeWhiz

      If you can assist me I’d be eternally grateful. I stopped using CrashPlan after 4.3 as it showed the drives on my NAS as Missing as I didn’t have time to troubleshoot. Now I need to get it up and running properly. I’ve updated the 4.4.1 on both Mac and DS412+ and my DS has shown me the GUID but now I need to update the file on my Mac with the GUID and I’ve hit an issue…in my /Library/Application Support/CrashPlan folder I have 1 ui file – ui_(username).properties and this file contains –

      #Sat Oct 10 07:07:49 BST 2015
      MessageDisplayed.UpgradeReminder=1444456613534
      window=422,208,800,610
      plus=true

      there is no GUID for me to update…how do I proceed from this point?

      CrashPlan is running on my DS and it also runs on my Mac but I don’t think the two are talking to each other…

      Reply
  7. R0n0b's avatarR0n0b

    I used to have the client on my Windows 10 system sending data to the headless server on my NAS. I used to be able to connect to either with the gui by changing the info in the ui.properties file. Now I can’t seem to get any of it to work. After doing the update on the NAS, I put the new port,guid,ip_address in my .ui_info file and now I can only connect the gui to the NAS. And the NAS shows my inbound backup (from the desktop) as disconnected. Any ideas?

    Reply
  8. wraczlavski's avatarjirikafka

    Little update for those considering leaving CrashPlan.

    After few days of using iDrive, I am not able to recommend it anymore. Backup works on and off, Synology “app” is hacked piece of garbage, and support is just your typical indian who knows nothing about nothing. It is budget solution and it shows on all fronts.

    So I switched yet again, this time to Amazon Glacier. Finally, this solution truly looks like it wasn´t developed by trio of drunken monkeys, and the official app from Synology has worked without hickup so far. Yes, 1 TB will cost you around 2 times more than with iDrive, but you are charged only for the gigabytes you really use. So, when you need to go for 1.1 TB, you don´t have to suddenly jump to 10 TB overkill.

    I´ll keep you posted how it goes.

    Reply
    1. Robbert Marrink's avatarRobbert Marrink

      I recognize completely what you mean about iDrive. It started well, but constant disconnects from the backup server and little to no support. I tried Crashplan again after a successful re-install, but network performance seems poor and it slows my NAS down. With the added unreliability with the upgrade proces I’m looking for an alternative. I’m comparing Amazon S3 and Glacier at the moment. Haven’t decided what fits my needs the best yet.

      Reply
      1. Rich's avatarRich

        What I didnt understand about idrive was that it didnt seem to allow you to go back to last Wednesdays version of the file. I have some high priority stuff on S3.. but it seems to suffer from the same problem, there doesnt seem to be a way to grab last Tuesdays version of your repository. I am a little afraid of glacier. The storage is cheap but the recovery can be very expensive. If you go and ask for 300 gigs without throttling the recovery costs can be in the hundreds of dollars. Any glacier app needs to do a very specific job of throttling the recovery requests otherwise you will get a giant bill. Glacier seems to be a great solution if you wanted to archive documents in a way that you would never expect to download more then a few percent of them each month.

      2. wraczlavski's avatarjirikafka

        From my Crashplan 3+ years experience, I rarely needed to retrieve more than few GB a year. Yes, A year. Its important to realize CrashPlan/Amazon are backup solutions, not your cloud drive. When I need access my files on the road, I just connect to my Synology. Or OneDrive. Or Google Disc.

        And when the catastrophe emerges, and I lose all my data? $100 for their retrieval is a trifle.

    2. andyyee's avatarandyyee

      My concern with using Glacier is that there doesn’t seem to be a great way of restoring your data. When I last looked into it, it’ll only restore to a Synology device. Which seems to defeat the purpose of using Glacier if the reason why you’re using a restore is if your Synology device becomes damaged/corrupted.

      Reply
  9. Myname's avatarMyname

    Well, I wasted hours on this but I need to share with you how i got around the issues that many people keep having.
    – First, THANK you for all your work on this. I’ve been tempted to try the Docker version, but won’t until you tell us is good. lol.
    -Ok, so….what was the problem???? Days ago, i switched to BASH. So when the install happens or when it runs or at some weird point, things just break.
    – I tried uninstall and reinstall, etc, etc. but netstat wouldn’t show me a running service, even though package manager said it was running.
    – as soon as i commented out the bash exec from my .profile…BOOM, it worked, it installed, alllll with the default and very complete recommendations from this post (Install, start, stop, start again, modify the client so you can connect, VOILA)

    Now, i have no idea why it would break it. I put the following to prevent a lot of the bash config to occur if it wasn’t an interactive login:
    # If not running interactively, don’t do anything
    [ -z “$PS1” ] && return

    But, it still stays in BASH.
    Anyway, no idea how to fix, just SOOO happy i can start backing up again.
    I hope this helps someone.

    Reply
  10. Michael's avatarMichael

    I have managed to get the client up and running again by making the file C:\ProgramData\CrashPlan\.ui_info (Windows) read only, as every restart would set the ip back to 0.0.0.0. I have been able to adopt my previous computer and all files have synchronised, but now the client stays on “waiting for back up” and the last back up line states “initial back up not complete”. It correctly reports the amount of files waiting for back up.

    Reply
  11. glenn b's avatarglenn b

    My 3 year old 3TB back up is gone, the client wont open on Mac, the NAS update failed, stopped backing up cos the backup is ‘gone’, the web account shows that indeed tha my backup is now gone.

    Thanks Patters for all your hard work but CrashPlan are losing it literally Perhaps it’s time to consider other options. They obviously dont like NAS users.

    Reply
    1. acn's avataracn

      Don’t jump to that conclusion so quickly. After all these issues I also found my CrashPlan client reporting as if nothing had backed up, but after a ton of time re-analyzing the data set it got back to where it was.

      My issue is now is that it’s not uploading anything else, it seems stuck, but the old stuff (nearly 2Tb) is there.

      Reply
      1. glenn b's avatarglenn b

        I’m not jumping to any conclusions quickly. I have spent many days adopting, synchronising backups (3TB) only to find that they are gone. Also worth bearing in mind that the Black Friday & Christmas deals are imminent so they will get a load more new subscribers who will no doubt be ‘low impact’. Ho hum the joys of ‘business’.

      2. acn's avataracn

        You should write to them then. They don’t support headless clients but they usually pay attention to someone that loses their backup and there’s nothing to restore even on the web platform. It’s simply something that shouldn’t happen, even if your local setup screws up.

  12. semperfidelis's avatarsemperfidelis

    I think the installation instructions for the Windows client need to be updated for v4.4.1.

    1. The ui_info is in two different locations: The locations are:
    c:\users\{user}\AppData\Local\CrashPlan\ui_info
    and
    C:\ProgramData\CrashPlan\.ui_info

    Per the instructions, I logged into the NAS as root and typed:

    echo `cat /var/lib/crashplan/.ui_info`

    From there I got the following:

    4243,5ffa54be-2d27-478f-be7d-445120adfb3e,0.0.0.0

    I changed the 0.0.0.0 to the local IP of the NAS and then pasted the above (with the IP change) into both ui_info files.

    2. There is now no ServiceHost line in c:\users\{user}\AppData\Local\CrashPlan\ui.properties

    I added the line with my actual ServiceHost IP but I’m not sure if I needed to.

    Bottom line is that it did not work until I added the updated ui_info data to the c:\users\{user}\AppData\Local\CrashPlan\ui_info location.

    Reply
    1. Sean's avatarSean

      This was the trick! I’ve been struggling for a few days to get the headless config to actually communicate and update .ui_info in the multiple locations fixed it.
      Thanks!

      Reply
    2. avpman's avataravpman

      I just want to clarify. Is the full file path then:
      c:\users\{user}\AppData\Local\CrashPlan\ui_info\.ui_info OR
      c:\users\{user}\AppData\Local\CrashPlan\.ui_info

      Reply
  13. CoachR's avatarCoachR

    I struggled to get things working again for this latest update. I had to complete a few extra steps over and above what’s in the instructions here on the site to get the client connected.

    On the Diskstation: I had to actually edit the .ui_info file on the Diskstation (instead of just reading it to get the GUID). That file had 127.0.0.1 following the GUID and I had to change that to 0.0.0.0. After I edited the file I had to stop and restart the Crashplan package on the Diskstation. NOTE: you have to ssh in as root to change permissions/edit the .ui_info file. I changed them the file to read only when I was done.

    On the Mac: Also, as someone else mentioned in the comments, I needed to set my .ui_info file on my client to read only after changing the GUID and address. Otherwise, every time I reboot (or start the client?) the file would revert…

    Seems to be working again for me. Hopefully this helps others.

    Thanks, again, for keeping development going on this!!

    Reply
      1. barrmy's avatarbarrmy

        patters – the above (changing from 127.0.0.1 to 0.0.0.0 in .ui_info) fixed it on a syno reinstall for me, so it would be helpful to change in the script…my other DS that didn’t reinstall did not need the change

    1. Mr Novo Cine's avatarpmcdonaldeditor

      I’m getting 127.0.0.1 in the NAS file as well. I’ve changed it to 0.0.0.0 like CoachR suggested as well as the IP’s in the two Windows files with no luck. I’ve also tried setting them all to the default 127.0.0.1, no luck, to my NAS’s IP 192.168.x.x, no luck, the NAS to 127.0.0.1 and the Windows files to my NAS’s IP, no luck. I get the Crashplan splash screen hanging indefinitely. Any advice? To date following the advice to the letter has worked. Patters has done an almighty job keeping this site and package updated but Code42 are making this all a little hard for us lately…

      Reply
      1. Mark's avatarMark

        Hi pmcdonaldeditor,

        I’m not sure what your settings are, but here’s what’s worked for me.

        1. Make sure that Crashplan is running on both your PC and NAS.
        2. Get the contents of the ui_info file on the NAS. ssh: cat /var/lib/crashplan/.ui_info ; echo
        2a. The format of this is ..
        3. Make sure that the in this file is open on the NAS firewall.
        4. Make sure that the in this file is 0.0.0.0.
        5. Copy the and to your computer.
        6. Set your computers ui_info file to …

        Be aware that every reboot of the program on the NAS or PC will wipe this file and you will need to restore these settings. Your PC is easy, just keep a healthy copy of the file on your computer and copy it into the directory everytime you reboot. If you restart crashplan or maybe even change the settings (such as logging in under a new account after a fresh install), then a new ui_info file will be created and you’ll have to pull the new data over SSH and renew the “good” file on your computer.

      2. Mark's avatarMark

        Hi pmcdonaldeditor,

        I’m not sure what your settings are, but here’s what’s worked for me.

        1. Make sure that Crashplan is running on both your PC and NAS.
        2. Get the contents of the ui_info file on the NAS. ssh: cat /var/lib/crashplan/.ui_info ; echo
        2a. The format of this is port.GUID.IPaddresss
        3. Make sure that the port in this file is open on the NAS firewall.
        4. Make sure that the IP address in this file is 0.0.0.0.
        5. Copy the port and GUID to your computer.
        6. Set your computers ui_info file to port.GUID.NAS_IPaddress

        Be aware that every reboot of the program on the NAS or PC will wipe this file and you will need to restore these settings. Your PC is easy, just keep a healthy copy of the file on your computer and copy it into the directory everytime you reboot. If you restart crashplan or maybe even change the settings (such as logging in under a new account after a fresh install), then a new ui_info file will be created and you’ll have to pull the new data over SSH and renew the “good” file on your computer.

        Edit: My previous reply was half-deleted because this website thought that I was trying to write HTML, so here is a fixed version.

  14. acn's avataracn

    Even with all these issues with the upgrades, I’ve often been able to connect to the CP client, just to find that it looked like it wasn’t backing up anything, though it showed no errors.

    So given that crashplan is back running properly and I still have no new uploads actually been done, here’s the log error I found:

    [10.11.15 13:23:04.338 INFO erTimeoutWrk e42.messaging.peer.PeerConnector] PC:: Cancelling connection attempt due to timeout – pending connection=PendingConnection[timeout(ms) = 10000, startTime = Sun Oct 11 13:22:49 IST 2015, remotePeer = RemotePeer-[guid=628269892669820948, state=CONNECTING, mode=PRIVATE, location=192.168.80.21:4242, public=62.48.253.239:0, transportPbK=X509.checksum(c31e3866331e096e43ef6d962942f9e2), transportPbKRequestable=false, connecting=2015-10-11T13:22:49:446, connected=0, disconnected=2015-10-11T13:22:14:326, attempts=2, connectActivity=2015-10-11T13:22:49:446, keepAliveSent=0, minRetry=33410, retryDelay=0, reflector=na, #nat=0, session=null], sessionData = MessageConnection[ sessionInfo=null, readBuffer=com.code42.messaging.nio.MessageConnection$MessageBuffer@1682936, maxBufferSize = 65536, currentSize = 0, enqueued = false, #items = 0, Connection[7258882, state=0, context = Context@13859914[null->nullconnectionState=0], SendBufferQueue[closed=false, queueSize=0, maxSize=1310720, enqueueTimeout=60000, numItems=0, waitingCount=0, waitingPriorityCount=0, items.size()=0, priorityItems.size()=0, lastEnqueueTS=0]]]]

    A couple of things are odd: first it’s the “cancelling connection attempt due to timeout” that isn’t seen anywhere else, the other it’s the “location” field that is populated with a 192.168.80.21:4242 IP address which is unfamiliar to me (my network is under 192.168.1.x).

    The history log is just a loop of “Starting backup”:

    I 10/11/15 01:35PM Backup scheduled to always run
    I 10/11/15 01:35PM [Padrão Dias Uteis] Starting backup to CrashPlan Central: 146,689 files (730.90GB) to back up
    I 10/11/15 01:40PM Stopping CrashPlan
    I 10/11/15 01:41PM CrashPlan started, version 4.4.1, GUID 544550513805885703
    I 10/11/15 01:41PM Backup scheduled to always run
    I 10/11/15 01:42PM [Padrão Dias Uteis] Starting backup to CrashPlan Central: 146,689 files (730.90GB) to back up
    I 10/11/15 01:47PM Stopping CrashPlan
    I 10/11/15 01:48PM CrashPlan started, version 4.4.1, GUID 544550513805885703
    I 10/11/15 01:48PM Backup scheduled to always run
    I 10/11/15 01:48PM [Padrão Dias Uteis] Starting backup to CrashPlan Central: 146,689 files (730.90GB) to back up

    I can’t find any other issues, connectivity test reports as ok (NAT Trasversal Ok) and no memory warnings (I have set 1900Mb heap size). Also, CrashPlan does not consider this behavior as irregular, I don’t get any “your computer is not being backed up in X days” messages or anything like that.

    I’d be thankful for any input on this.

    Reply
    1. acn's avataracn

      Ok, I’ve figured out that that log excerpt is not even important. It was there because crashplan was trying to connect to one of my old computers, listed under my account but unused for a few years now.

      The problem is that CrashPlan is still not doing any actual backups and I can’t pinpoint what’s wrong.

      Reply
      1. coutch's avatarcoutch

        I have the same exact issue. crashplan was running great from my qnap nas during the trial period, but after paying up, and upgrades, it’s not backing up anything anymore.

      2. acn's avataracn

        Yeah, but I can’t find anyone with a solution for this. I’ve written to support, even though they don’t support headless configurations and still no reply.

  15. thegoose's avatarthegoose

    I’ve given up waiting for Crashplan to be available again on my DS-415+ (it still doesn’t show up in Package Center). Fortunately I have a small reasonably inexpensive “server” (HP ProLiant MicroServer running Ubuntu linux) that I’ve already moved other services to. Getting Crashplan up and running there was straightforward, it picked up where the Synology left off, and I’m back in business.

    As an aside, I also have a single large disk in this device to backup my Synology via rsync. I put this in place after my old NAS (Netgear) had a hardware failure, and I realized that RAID storage only protected me from a drive failure. So why Crashplan? One, I’m already using it for each of my family members computers (great “family plan” w/ Crashplan), but also for offsite backup in case something happened to my house.

    Reply
  16. cdonnellytx76's avatarcdonnellytx76

    Something of a “gotcha” to be aware of for longtime (pre-5.0 days) PC LOAD LETTER package users…

    I had trouble downloading the file from Code42 because I had installed wget from ipkg, which doesn’t include builtin https support and was overriding the version the package installer was trying to use. After I uninstalled it, the default wget (which does include https support) worked, and the package installed successfully.

    While I did find that the ipkg package list includes a wget_ssl (which may or may not fix the problem), I don’t recommend using its wget anymore simply because it is out-of-date and the Synology one is “good enough”.

    Reply
  17. jerseygirl54's avatarjerseygirl54

    I have upgraded both client and diskstation to 4.4.1. and changed ip in.ui_info and .ui_properties, but I am still unable to connect to the client. It stalls so I’m unable to change any settings. Very frustrated. Could you help me with this? I sure would appreciate it.

    Reply
    1. jerseygirl54's avatarjerseygirl54

      Just an update…it now works! Apparently, I missed a “0” in the GUID before the ,0.0.0.0. Once I added it, everything works! Note to self…check the numbers!
      Thanks so patters for this!

      Reply
  18. jbrerhel's avatarjbrerhel

    My client is now seeing the Synology and everything appears to be running. But the client now automatically quits after about 15 minutes. It never finishes the initial startup scan for new changes. Is anyone else seeing this issue?

    Reply
    1. Richard's avatarRichard

      This sounds like a “out of memory” issue
      You could split up your backup-set or increase the heap-size

      Reply
      1. acn's avataracn

        I would bet that in this case it’s not an “out of memory” issue. I have the same behavior and I am positive that’s is not the issue (1.9Gb of RAM heap size, like it was set before all this). It restarts without any significant error in the logs.

      2. iNSaNe-oNe's avatariNSaNe-oNe

        Same here, my DS213j was backing up 1,5TB of files flawlessly before the 4.4.1 update, now it stops the CrashPlan package after a minute or 10-15, restarts it and loops this behavior. If you pause the backup the initial scan will eventually finish, but once started, the client just quits and it never gets past the ‘analyzing’ phase of new files to backup. It never starts sending files. Has it anything to do with the new libjna files in this release? I’m slightly disappointed by this behavior, my backups to CrashPlan are not updated anymore.

  19. Tony's avatarTony

    What if you are backing up to TWO Nas from one client – surely this will not work if you change the IP from 0.0.0.0?

    Reply
    1. George's avatarGeorge

      Hi Tony,
      There are two usage scenarios for Crashplan on Synology. One is backing up client files to the NAS using the CP client on your client computers (my scenario and I think yours), the other backing up NAS files to Crashplan Central (the cloud), which I think many are doing.
      In the first usage, you do not need to change the client .ui_info file IP address (mine is still 127.0.0.1 from the original install). I am backing up successfully from my client systems (Linux and Windows) to the CP engine running on the NAS. I do not backup to Crashplan Central as I use Synology Backup and Replication to copy the backup archives to external hard disks.
      The only time you need to change the IP address on the client to the IP address of the NAS is if you wish to change setting for the NAS CP engine (eg change default backup archive location after install).
      So, in your case, set up the two NAS CP instances, and once they are running, you will see them in the list of computers in the Destinations list on your client. Set up schedules as you wish for each destination and you are good to go.
      Hope this helps and that I have not misunderstood your query
      George

      Reply
      1. Tony's avatarTony

        Hi George,
        Thanks for swift response :-)
        We have one client and two CP headless NAS. The client was happily backing up to both until one of them updated to the new version 4.4. Now it cannot connect. Do we put *both* NAS port, guid, IP entries in the client .ui_info file?
        Cheers, Tony

      2. George's avatarGeorge

        Tony,
        I don’t have anything to do with the NAS in my client .ui_info files, my IP addresses are 127.0.0.1 and I have not changed the GUID
        One thought, have you checked the /var/lib/crashplan/.ui_info on your NAS to confirm IP address is 0.0.0.0 rather than 127.0.0.1. Others have reported this being necessary and patters said he would update his package to set this. I did do an update from his 4.4.1 package when it became available.
        Happy hunting!
        George

      3. David's avatarDavid

        George. You mention IP on NAS (/var/lib/crashplan/.ui_info) needs to be 0.0.0.0 – but doesn’t it need to be changed from 0.0.0.0 to the actual NAS IP? I though that was a new requirement since the last update??

      4. George's avatarGeorge

        David
        My understanding of the discussion on this that the NAS .ui_info file just needs 0.0.0.0 (which I think means “any IP”). That is how my NAS is setup.
        If I/you want to manage the NAS instance (eg change any CP on NAS settings), then you need to change IP in client .ui_info file to be able to connect.

  20. David's avatarDavid

    Hi,

    Connects but not backing up ?

    Name Files Size Complete % Last Connected Last Known IP
    NAS 1087101 1.3TB 90% 3 mins xxx.xxx.xxx.xxx

    I just run crashplan as a headless client on my DS1511+. It connects OK, but back-up progress hasn’t changed from 90% since the new update came out.

    I’ve updated the ui.info file etc – any ideas ?

    Cheers

    Reply
  21. jack's avatarjack

    For some reason the my.service.xml on the synology did not have the correct setting. I had to update it to 0.0.0.0 in order to connect to the service port. Also, would it be possible to store the uuid in .ui_info in a more permanent place and copy/overwrite it when the package is started? I’ve had to update my ui_info several times now because the file gets deleted or updated.

    Reply
    1. B.Goodman's avatarB.Goodman

      I stop crashplan service on my NAS nightly do the disks sleep and restart every afternoon. My port and GUID change every time the service starts! It never did this before. Now I have to edit the .ui_info on the PC daily to connect to the NAS, then in the client GUI in the PC, I change the port. EVERY DAY now!

      Reply
      1. B. Goodman's avatarB. Goodman

        Maybe I’m wrong to say the GUID is changing. It’s the port and the number immediately after the port in the .ui_info file. Still changing every time the service starts:
        drwxr-xr-x 2 root root 4096 Jul 8 21:33 .
        drwxr-xr-x 16 root root 4096 Oct 15 15:56 ..
        -rw——- 1 root root 2360 Oct 15 16:00 .identity
        -r-xr-xr-x 1 root root 49 Oct 15 16:00 .ui_info

        See how the file on my Synology has today’s date and a time of 16:00? That is the exact time I started the service via scheduled task.
        I tried using chmod to make the file -r–r–r– and I note today it’s rx.

      2. B. Goodman's avatarB. Goodman

        My scheduled task to copy the existing .ui_info file back as soon as the service restarted did not resolve my issue. I’m embarrassed to say that I started mucking around with both .ui_info and .ui_[MyUsername].properties and somehow when I thought CrashPlan was working again, it had reverted to connecting back to my local client, rather than the Synology. I then updated the .ui_info again to match the results from “cat /var/lib/crashplan/.ui_info ; echo”.

        At some point, my PC froze for a good minute, with some weird screen gibberish before finally hard crashing with a BSOD (Win 8.1). After restarting, CrashPlan connected to the Synology and suddenly the “cat /var/lib/crashplan/.ui_info ; echo” results stablized and survived a service restart on the Synology for the first time since CrashPlan 4.3.

        I gave up fighting to force the use of my chosen port and instead altered my Port Forwarding on my router to match what CrashPlan on the Synology kept insisting to use. Oddly, none of my friends’ CrashPlans were seeing my Synology as being on, though internally my PC was connecting fine. Rebooting the router didn’t help. Finally, after an hour, I rebooted the Synology and suddenly my friends’ PCs were all seeing it and starting backups.

        The moral of the story is that sometimes it’s good to be lucky?

    2. jbrerhel's avatarjbrerhel

      How do you access and update the my.service.xml on Synology? Sorry for the NOOB question but I don’t know how to find files on the Synology (CP logs as well). Do I need to SSH in? Is there GUI for viewing and manipulating the files?

      Reply
  22. qriff's avatarqriff

    Patters, please datestamp your post and updates. There is “no way” of telling if this article/post has expired a few years ago or updated yesterday.

    Reply
  23. Charlie's avatarCharlie

    Hi guys, I managed to update my Crashplan app to the latest version, with no problems. I have a DS415+, with 8GB RAM upgrade. In order to access the app through your PC, follow the “Crashplan Client Installation” written in this site.

    Replace the default ip in the serviceHost with your NAS’s ip and then run the SSH session (I use WinSCP portable) with echo `cat /var/lib/crashplan/.ui_info` command, the result should look something like this:

    4243,9ac9b642-ba26-4578-b705-124c6efc920b,0.0.0.0

    Copy and paste the result in the .ui_info located in c:\users\{user}\AppData\Local\CrashPlan\ui_info (remember to replace the default values with your own data)

    IMPORTANT!!! This is not mentioned in the installation guide.

    Replace the 0.0.0.0 with your NAS’s local ip address.

    Try connecting and if you’ve followed these instructions, it should work.

    I really hope this can help all of you, since I myself have been helped many times in this forum!

    @patters – Thank you so much for all your hard work!!!

    Cheers!!!

    PS.: Feel free to correct me if I’m wrong, but it worked for me.

    Reply
  24. Johnny Bane (@johnnybravobane)'s avatarJohnny Bane (@johnnybravobane)

    Hi,

    I am struggling to find the .ui_info file on my mac so that I can edit. I have tried to navigate to it using the path to make sure it is there and i can’t find it at

    /Library/Application Support/CrashPlan/.ui_info (Mac OS X)

    and when I try to use terminal (sudo nano /Library/Application Support/CrashPlan/.ui_info) it doesn’t open the file but asks me to write a new file. I am a recent mover to a Mac after always been a Windows man so I might be doing something daft here. Can you put me out of my misery??

    Johnny

    Reply
    1. acn's avataracn

      First rename the file in Terminal, e.g.:
      mv .ui_info t.ui_info

      Make your edits and revert the file renaming.

      Reply
    2. patters's avatarpatters Post author

      Did you try using terminal, but enclosing the full path in quotes? That space in “Application Support” is possibly the issue.

      Reply
  25. Alex's avatarAlex

    I couldn’t get the PROe app to work on my Sonology, so decided to scrap the idea and test backing up of mapped network drive from my Mac. I’m in the UK so using Ceejay server and app. Can you think of any downsides of backing up NAS as mapped drive?

    Reply
  26. arestant's avatararestant

    The Crashplan App changes the content of the “ui_info” back to default value after restart the computer. Not overtime but most of the time. (Version 4.4.1, Mac OS)

    Any ideas?

    Reply
    1. acn's avataracn

      As it is right now with DSM 5 – for me not uploading any new data – no, I won’t be upgrading until this is stable again.

      Reply
      1. BranislavG's avatarBranislavG

        @ Stephen Cranfill, Mark Venn – results apparently vary, mine’s busted since DSM 6.0 instal. Reinstalling the package didn’t help. Yep, I know, my fault, but I might be interesting what’s broke it this time or if there is any solution.

    2. The Dude's avatarThe Dude

      DS414 DSM 6 beta – Crashplan did not survive. Won’t start. Uninstalled, reinstalled. Still will not start.

      Reply
      1. Stephen Cranfill's avatarStephen Cranfill

        In a sense, I got lucky. My Crashplan survived the DSM 6 upgrade. That’s a good thing since my external USB disks that I use for onsite backups now spontaneously eject after a few hours.

      2. patters's avatarpatters Post author

        I can’t move to DSM 6.0 beta until beta 2 because I run Surveillance Station which isn’t currently compatible.

  27. wraczlavski's avatarjirikafka

    These comments last few weeks… From what I see, running CrashPlan on Synology is starting to be not so much about actual backing up your data as it is about solving devious linux puzzles in exchange for few more days of uptime.

    Reply
  28. sman's avatarsman

    Crash plan was working, but for some reason wouldn’t start anymore. I uninstalled it from my Diskstation, and then reinstalled it, stopped the service and restarted it. Then I connected via ssh and tried: echo `cat /var/lib/crashplan/.ui_info` and it returned the correct info except the IP listed is not 0.0.0.0, instead it was 127.0.0.1. The client still will not connect. I’ve edited the ui.properties file to make sure the IP address is pointing to the NAS and is NOT commented out.

    What am I doing wrong?

    Reply
    1. George's avatarGeorge

      Did you change the client .ui_info file as detailed in instructions above starting with “Starting with CrashPlan version 4.3.0 …”? You have to change the GUID and IP address in the client .ui_info file.

      Reply
  29. Dale's avatarDale

    I’ve discovered another odd anomaly. At first I was running 4.3.1 with the older CP package that worked for it, and when it kept attempting to update the client the update would fail and CP kept working with my DS214+. However, one weekend the update succeeded and backups were broken. After updating the package, installing the latest version of the client software, and copying my port and GUID from the NAS, I was able to get backups working again, however I notice that now my log is empty, both on the NAS and on the client. Backups and restores continue to work, but the log now appears to be broken.

    Reply
  30. acn's avataracn

    I’ve rebuilt my entire cache and still nothing on my DS412+. It runs the GUI just fine but I found that in the middle of the logs there are java Exception errors appearing:

    STACKTRACE:: com.code42.exception.DebugException: BQ:: Exception: java.lang.NullPointerException, Skipping and removing! FileTodo[fileTodoIndex = FileTodoIndex[backupFile=BackupFile[459ac7bb863533c77e82bef8c169dda9, parent=a28e2d1f7ffa8244784df08af2dba51e, type=0, sourcePath=/volume1/*****THISWASONEOFMYFILESHERE*****], newFile=true, state=NORMAL, sourceLength=6621593, sourceLastMod=1410121622000], lastVersion = null, startTime = 1445382999841, doneAnalyzing = false, numSourceBytesAnalyzed = 0, doneSending = false, %completed = 0.00%, numSourceBytesCompleted = 0]; BC[544550513805885703>42, sameOwner=f, backupConnected=t, authorized=t, usingForBackup=t, backupReady=t, backingUp=t, validating=f, closing=f, keepBlockState=1, con=2015-10-21T00:11:18:727, val=2015-10-21T00:13:59:434, readyCheckTime=2015-10-21T00:11:18:727, MM[BT 544550513805885703>42: openCount=2, initialized = true, dataFiles.open = true, /volume1/@appstore/CrashPlan/cache/42], session=Session[id=712419434112002110, closed=false, isAcceptor=false, remoteIdentity=ENDPOINT, completedAuth=true, lat=2015-10-21T00:16:21:007, lrt=2015-10-21T00:15:57:566, lwt=2015-10-21T00:16:21:007, #pending=0, enqueued=false, local=192.168.1.74:39678, remote=162.222.41.231:443, usingProtoHeaders=true, usingEncryptedHeaders=true, WAN], syncHandler=ClientSyncHandler@28597508[ timestamp=0, txValid=false, bmfValid=false, propsValid=false, pathsValid=false, throttler=700/1000], hosted=t, hostedCloud=t, replacing=f, selectedForBackup=t, selectedForRestore=f, validationNeeded=f, backupUsageTime=2015-10-21T00:16:21:006, restoreControl=RestoreReceiveControl@16816411[ , hasRestoreEnv=false, hasRestoreJob=false ], cacheMaintenanceState=null, BackupQueue[544550513805885703>42, running=t, #tasks=0, sets=[BackupFileTodoSet[backupSetId=687787892003045703, guid=42, doneLoadingFiles=t, doneLoadingTasks=f, FileTodoSet@27235396[ path = /volume1/@appstore/CrashPlan/cache/cpft687787892003045703_42, closed = false, hasLock = true, dataSize = 2769131, headerSize = 0], numTodos = 25678, numBytes = 215314935946]], BackupFileTodoSet[backupSetId=1, guid=42, doneLoadingFiles=t, doneLoadingTasks=f, FileTodoSet@29309104[ path = /volume1/@appstore/CrashPlan/cache/cpft1_42, closed = false, hasLock = true, dataSize = 497900, headerSize = 0], numTodos = 2778, numBytes = 56392392415]], BackupFileTodoSet[backupSetId=706610375256847611, guid=42, doneLoadingFiles=t, doneLoadingTasks=f, FileTodoSet@19057538[ path = /volume1/@appstore/CrashPlan/cache/cpft706610375256847611_42, closed = false, hasLock = true, dataSize = 33000550, headerSize = 0], numTodos = 134545, numBytes = 246963365364]], BackupFileTodoSet[backupSetId=687866989194510660, guid=42, doneLoadingFiles=t, doneLoadingTasks=f, FileTodoSet@22992339[ path = /volume1/@appstore/CrashPlan/cache/cpft687866989194510660_42, closed = false, hasLock = true, dataSize = 210209, headerSize = 0], numTodos = 1599, numBytes = 13413384192]]], env=null, TodoWorker@3014986[ threadName = BQTodoWkr-42, stopped = false, running = true, thread.isDaemon = false, thread.isAlive = true, thread = Thread[W5686859_BQTodoWkr-42,5,main]], TaskWorker@15812268[ threadName = BQTaskWrk-42, stopped = false, running = true, thread.isDaemon = false, thread.isAlive = true, thread = Thread[W5039087_BQTaskWrk-42,5,main]]] ]
    at com.code42.backup.save.BackupQueue.handleException(BackupQueue.java:1255)
    at com.code42.backup.save.BackupQueue.processTodo(BackupQueue.java:902)
    at com.code42.backup.save.BackupQueue.access$800(BackupQueue.java:99)
    at com.code42.backup.save.BackupQueue$TodoWorker.doWork(BackupQueue.java:1807)
    at com.code42.utils.AWorker.run(AWorker.java:148)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
    at com.code42.backup.handler.BackupHandler.(BackupHandler.java:117)
    at com.code42.backup.save.BackupQueue.saveFile(BackupQueue.java:1328)
    at com.code42.backup.save.BackupQueue.processTodo(BackupQueue.java:887)
    … 4 more

    I first saw this while running Java 8, uninstalled and installed Java 7, but it’s the same thing.

    Any thoughts?

    Reply
  31. Dirk's avatarDirk

    It seems that the content of .ui_info is reset once in a while. I noticed it after a reboot of MacOSX that I had to change the UID in the file once again.

    Reply
    1. Mike's avatarMike

      I’m constantly seeing this. It appears that CP is regenerating the .ui_info file on the Mac Client, so each time I have to ssh into my DS in order to get the correct GUID.

      Reply
  32. Scott Tomlinson (@Scottio200)'s avatarScott Tomlinson (@Scottio200)

    Ok followed the information above and have everything in place

    When opening the client on a mac I’m asked for a Crashplan PROe server address which i enter (I’m using ceejay.net) however I am always getting the error message that it cannot connect to the server with the message to check my network

    Anyone else got this issue?

    Reply
  33. Tim Johnson's avatarTim Johnson

    So after updating to the latest client 4.4.1. I can connect to my synology and it starts the backup but then Desktop app stops and the logs only show that crashplan stopping.

    Also I noticed if i restarted my desktop the ui_info file would change and I would have to go back and ssh into synology to get the correct info and update the ui_info file.

    Reply
  34. Tim's avatarTim

    after upgrading the synology and the client app to 4.4.1. My crash plan keeps stopping and the log only says crashplan stopping. It gives no error.

    Also I noticed as well that if I reboot my desktop the client app won’t connect the ui_info file changes and I have to ssh into synology get correct info then update ui_info file.

    Reply
    1. acn's avataracn

      Check if your RAM heap size is high enough, maybe you had changed it before. You should see it in:

      tail /var/packages/CrashPlan/target/syno_package.vars

      If that’s not the issue, then you have my issue, which is CrashPlan not backing up anything, though you can connect and it scans the files. I have found no solution for this so far.

      Reply
  35. jbrerhel's avatarjbrerhel

    I am trying to locate the crashplan log on my Synology. According to Crashplan support, the location should be /usr/local/crashplan/log. But there is no crashplan directory under /usr/local. Can anyone point me in the right direction? Thank you!

    Reply
      1. jbrerhel's avatarjbrerhel

        Thank you very much! Finally was able to confirm that my issue is memory. Which makes sense given I am using a Synology DS212j with 256mb RAM (you read that right!). This is the end of the road for me. I am giving up on running CP headless for now.

  36. jerseygirl54's avatarjerseygirl54

    Does anyone have an issue with disconnects from LAN/WAN? When the Crashplan starts, I’m unable to connect and it doesn’t show up on a ping or my network. I have to press the restart to connect. Is there a fix for this?
    Thanks again in advance.

    Reply
  37. noot101's avatarnoot101

    I Upgraded to 4.4.1 and cannot connect windows client to backup-engine anymore.
    Changed Guid and IP-address in .ui_info. But still nothing.
    How can I fix this?

    Reply
  38. David Llewelyn's avatarDavid Llewelyn

    Hi there. Firstly thanks for developing this! Great tool for us Synology users.

    Crashplan claims to have now backed up 100% of my data from my Synology DS415+ (verified from the Crashplan website). However, noticing some odd behaviour. When I try to connect with the Mac client now, it will begin scanning the entire set again (I am only using the default set). About halfway through this, the Mac client now just quits unexpectedly. No error thrown.

    Looking at the log at the server end, I can see weirdness.

    10/27/15 3:35 AM CrashPIan started, version 4.4.1, GUID xxxxxxxxxxxx
    10/27/15 3:35 AM Backup scheduled to always run
    10/27/15 3:35 AM [Default] Scanning for files to back up
    10/27/15 3:36 AM [Default] Starting backup to CrashPIan Central: 189 files (3.60MB) to back up
    10/27/15 3:37 AM Stopping CrashPIan
    10/27/15 3:38 AM CrashPIan started, version 4.4.1, GUID xxxxxxxxxxxx
    10/27/15 3:38 AM Backup scheduled to always run
    10/27/15 3:38 AM [Default] Scanning for files to back up
    10/27/15 3:39 AM [Default] Starting backup to CrashPIan Central: 189 files (3.60MB) to back up
    10/27/15 3:40 AM Stopping CrashPIan

    And this is repeated every minute or so for the last few days despite ‘verify selection’ being set to every week. Is this just normal behaviour if the backup frequency being set to always? Every minute seems overkill. Also, the Mac client closing all the time seems odd.

    Can you help?

    Reply
    1. David Llewelyn's avatarDavid Llewelyn

      Further to this. When I set the backup to run between specific times and then manually set-off a verify selection, it comes back telling me actually 172gb are not backed up.

      This previously mentioned behaviour of starting and immediately stopping continues ever minute whenever the backup is supposed to be running. The amount remaining to backup never decreases meaning it is failing.

      This is BIG issue as it totally undermines any confidence that Crashplan is 1) Accurately reporting progress. 2) Completing its tasks.

      Any insight here would be greatly appreciated. It’s so frustrating to get all the way to 91% complete and then have it fail at the last minute.

      Reply
      1. GrantYN's avatarGrantYN

        What is your heap size? This has happened to me when I’ve forgotten to increase the default heap size. Also, if you are backing up a large data set you should consider breaking it up into several smaller sets.

    2. avpman's avataravpman

      The client closing all the time could be a memory heap issue on the NAS server side. Especially if you’re backing up 1TB or more of data.

      This fix worked for me on my DS416 which has1GB RAM installed. If your NAS doesn’t have at least 1GB of RAM then DO NOT do this.
      1) Stop CrashPlan from the Synology Packages Panel
      2) ssh to the NAS and navigate to the file /volume1/@appstore/CrashPlan/syno_package.vars
      3) make a backup of it i.e. cp syno_package.vars syno_packages.vars.bak
      4) edit the syno_package.vars file with “vi” (sorry, instructions to do that are beyond this scope)
      5) you will see the following line in the file
      #USR_MAX_HEAP=1024M
      6) REMOVE the “#” from the beginning of the line with 1024M so it reads:
      USR_MAX_HEAP=1024M
      7) If the line contains anything other than 1024M then change it to 1024M (i.e. it may originally contain 512M)
      8) save the file
      9) restart CrashPlan from the Synology Packages Panel

      Hope this fixes it for you like it did for me.

      Reply
    3. DaLiNL's avatarDaLiNL

      Did have the exact same issue with scanning, stopping and restarting and rescan the whole every x minutes.
      Did Uninstall the CrashPlan package, reinstalled, started and waited for the log shows it has started. Stopped, started and copied the new key in .ui_info to my Mac.
      Started the client, filling in email and password and until now it is scanning without stopping and restarting.

      Reply
  39. aberrixJosh's avataraberrixJosh

    Thank you so much everyone! My backups had been failing for a month now and I hadn’t had the time to diagnose & repair it, took me about 20 minutes this morning reading through some comments and my NAS is now re-syncing and good to go!

    Reply
  40. Dale's avatarDale

    Any ideas about the empty log? Running packages CP_Pro 4.4.1-0034 and Java SE Embedded 7 1.7.0-0034 on the DS214+, and using 4.4.1 – 1435726800441 on my client. Backups and Restores work perfectly, but the log is now useless.

    Reply
      1. Per's avatarPer

        Hi,
        Copy service.log.xml from /var/packages/Crashplan/target/upgrade/1435726800441.1445963748979/service/log.xml to /var/packages/CrashPlan/target/conf

        That worked for me.

      2. stevens420's avatarstevens420

        I attempted to SSH into the Synology and looked for the /var/packages/CrashPlanPRO/target/upgrade directory, but there is no 1435726800441.1445963748979 directory within it (or any other similar numbers), only multiple sh files and a couple bat files. Also, there is only one directory within the upgrade folder, named UpgradeUI, which is empty.

        When I looked in /var/packages/CrashPlanPRO/target/conf the service.log.xml file is already present there, along with my.service.xml, ui.log.xml, upgradeui.log.xml, and default.service.xml.

        The client continues to list a blank history, and when attempting to access the log on the Synology, it only says “No Data”.

      3. stevens420's avatarstevens420

        Thanks anyways. I have no doubt that the problem is on the Synology end, but apparently it’s a different one. I had uninstalled the old CrashPlanPRO syno package before installing the new one, so perhaps that’s why the upgrade folder isn’t populated as expected. Perhaps the new package doesn’t support my Java Version properly, or something else is scrambled within the CP package folders.

        I had forgotten to mention that I had to set my C:\ProgramData\CrashPlan\.ui_info file to read-only to keep it from changing GUID and port numbers all the time. After doing this, Backup functionality was able to survive a reboot of the client. But the log stopped working after this was done, and I cannot figure out why.

      4. stevens420's avatarstevens420

        Updated Java package to 1.7.0_75-0034 but the log remains empty. Clearly it’s not a Java issue.

      5. Stevens420's avatarStevens420

        Thanks for the info. I may try updating DSM to see if it helps. Updating Java didn’t. But the file was already in the correct location, so it must be something else.

      6. stevens420's avatarstevens420

        Thanks for the info. I may try updating DSM next. But the service.log.xml file was already in the right place, so it may be something else. Updating Java didn’t help.

  41. Jon's avatarJon

    My Syno was recently rebooted for the first time in weeks, and after it came back up, the CrashPlan GUI client on my monitoring PC could no longer connect to the service on the NAS. It gave no error message – it just hung at the splash screen.

    Further investigation revealed that both the port number and the GUID on the Syno had changed!

    Updating those two fields in .ui_info on the GUI PC to match the new .ui_info on the Syno got it working again. A simple fix, but a trap for young players. I have no idea whether the port and/or GUID changes had been pending for a while and merely took effect when the Syno was rebooted, or if the reboot itself was the cause, but unless someone can come up with an automated way to synchronize these files, I fear that maintaining a headless CP installation is going to require ongoing manual intervention.

    Perhaps some enterprising hacker could come up with a linux script to copy .ui_info into a shared folder on the Syno on a regular basis (or maybe only on reboot) and a Windows batch file to extract the relevant details from it and build a new .ui_info on the monitoring PC.

    Reply
  42. Singularity's avatarSingularity

    Code42 is releasing version 5.x with no JVM needed for MAC and soon Windows. I wonder how much longer they’ll keep the 4.x Java version going? Sounds like the writing is on the wall for our nice solution to go bye bye… :(

    Reply
    1. Márcio's avatarMárcio

      From the release notes of version 5.0.1, Linux will continue to be supported, so we will still have a Linux based solution.
      Just not Java based.

      Reply
  43. wraczlavski's avatarjirikafka

    Continuation of the story of me leaving Crashplan: Chapter 3 – Going full circle

    After increasing problems with CrashPlan running on Synology, I began my journey to new cloud backup service. First adept, iDrive, tried its best to show its better face, but the facade lasted only that long. First problem arose, and the ugly parts have been revealed.

    I went to the big guns then, Amazon Cloud Services. Hell, Synology has its own app for Glacier, if that doesnt work, nothing will. And yes, it worked without hickup. But then the limitations started to fade in. You cannot adapt folder, recovery of the file is not exactly straightforward and quick, there is no file versioning (thats only in more expensive service, S3), … So I started to thing in different ways.

    I knew CrashPlan suited all my needs perfectly. Except that dreaded NAS support I clinged to so much, I forgot there are better, and supported ways.

    Long story short, I bought miniPC (AsRock Beebox). $200 + 5 watts per hour is the price for the ticket to worry-free using of CrashPlan.

    So yes, after I tried different cloud services in order to leave CrashPlan, I ended up using it again, this time in proper way.

    Reply
    1. avpman's avataravpman

      Hi,
      What exactly did you use the miniPC for? I’m not sure in understand your setup, especially when you said “I ended up using it again, this time in proper way.” Are you not backing up your NAS any longer?

      Reply
    2. B. Goodman's avatarB. Goodman

      Care you elaborate? How much RAM does the Beebox have and what OS? Did you map drives to each Synology share?

      Reply
      1. wraczlavski's avatarjirikafka

        It differs model from model, I´ve bought barebone version with quad core Intel N3150 and installed 8 GB RAM + 60 GB SSD. I had spare parts, so it didn´t cost me anything, otherwise you´d have to buy them. As of operation system, you can buy unit with W8/W10 licence, or cheaper one without OS, and install your preferred choice (linux).

        On this computer, I map Synology share folders as network drives, and mark them for backup in CrashPlan app.

    3. Simon's avatarSimon

      Interesting… makes me realize that since I have a ome computer (a Dell Optiplex) that’s always logged on to the SAN, I could just do what you did – map the drives I want to backup, and back them up from that computer. However I ran into two issues:
      1) The mapped drives don’t show up in CrashPlan when I run the app on that computer (Windows 7)
      2) For some reason, the mapped version of ‘Home’ (where cloudstation stores all its files) doesn’t show the Cloudstation folder, although when I look at it via Filestation under DSM, there it is

      Doubt the two issues are related, but would really appreciate any advice on how to address either

      Reply
  44. JimM's avatarJimM

    Update Broken again? The 10/26 update to 4.4.1 fails on my 412+. Here are the release notes from CP:
    “Beginning on October 26, 2015, all CrashPlan apps that connect to the Code42 cloud received additional updates to version 4.4.1:
    -Improvements to the CrashPlan app upgrade process.
    -Corrects issue in which some users experienced problems restoring folders with restricted permissions on Windows devices.
    -Corrects a rare issue in which the CrashPlan app for Windows did not open after upgrading to version 4.4.1 and displayed the error message “Failed to load Java VM library (errno=193).”
    -Additional performance and stability improvements.”

    The update is downloaded and expanded in the Upgrade folder by the app. It re-tries multiple times, with CP eventually going offline. Deleting the update files and re-starting the package makes CP available again for a short time, but the process repeats. Any suggestions welcome.

    Reply
  45. OJ's avatarOJ

    Hi there,

    After a recent automatic DSM upgrade I’m now seeing the CrashPlan package failing to start. Here’s what the log looks like:

    I 10/27/15 07:39AM Downloading a new version of CrashPlan.
    I 10/27/15 07:39AM Installing upgrade – version 1435726800441
    I 10/27/15 07:39AM Upgrade failed – version 1435726800441
    I 10/27/15 08:09AM Downloading a new version of CrashPlan.
    I 10/27/15 08:09AM Installing upgrade – version 1435726800441
    I 10/27/15 08:09AM Upgrade failed – version 1435726800441
    I 10/27/15 06:10PM Stopping CrashPlan
    I 10/28/15 02:08PM Synology repairing upgrade in
    I 10/30/15 04:49AM Synology repairing upgrade in
    I 10/30/15 07:43AM Synology repairing upgrade in
    I 10/30/15 07:43AM Synology repairing upgrade in

    On the NAS, the file system contains what appears to be the remnants of a bunch of failed attempts at… something!:


    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445893844342
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445895585265
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445897386352
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445899181174
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445900976635
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445902781375
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445904584930
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445906378873
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445908188455
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445909979994
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445911787245
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445913579929
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445915374088
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445917178415
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445918987796
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445920778266
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445922585731
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445924378468
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445926187786
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445927977893
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445929787752
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445931580520
    drwxr-xr-x 4 root root 4096 Oct 29 21:43 1435726800441_59.1445933374382
    -rw-r–r– 1 root root 33859963 Oct 26 19:23 1435726800441_59.jar

    I’ve nosed around a little to see what might be the issue, but the lack of logs is a killer. Patters, could you give me a pointer or two please as to where to look?

    Thanks mate.
    OJ

    Reply
  46. Jan Frederik Léger's avatarJan Frederik Léger

    Package was stuck on some upgrades from Code42 for some days.
    Upgrades: 1435726800441_59.1446197341696 and 1435726800441_59.1446197348786.
    (1) start-stop-status.sh seems not to be able to handle multiple upgrades. Could you fix this? I had to manually move the second upgrade folder away, launch CrashPlan (to make the first upgrade to be applied) and put the second upgrade folder back.
    (2) start-stop-status.sh seemed not to be able to handle underscores in the upgrade number.
    (3) start-stop-status.sh was stuck on not finding bin/jna.jar.

    I edited start-stop-status.sh to fix for the problems (2) and (3). Diff below:

    @@ -66,7 +66,7 @@
    echo “I ${TIMESTAMP} Synology repairing upgrade in ${SCRIPT_HOME}” >> ${DLOG}

    mv ${SCRIPT_HOME}/upgrade.log ${SCRIPT_HOME}/upgrade.log.old
    – UPGRADE_VER=`echo ${SCRIPT_HOME} | sed -r “s/^.*\/([0-9_]+)\.[0-9]+/\1/”`
    + UPGRADE_VER=`echo ${SCRIPT_HOME} | sed -r “s/^.*\/([0-9]+)\.[0-9]+/\1/”`
    unzip -o ${OPTDIR}/upgrade/${UPGRADE_VER}.jar “*.jar” -d ${OPTDIR}/lib/
    unzip -o ${OPTDIR}/upgrade/${UPGRADE_VER}.jar “lang/*” -d ${OPTDIR}
    mv ${SCRIPT_HOME}/upgrade.sh ${SCRIPT_HOME}/upgrade.sh.old
    @@ -74,10 +74,9 @@
    fi

    #updates may also overwrite our native binaries
    – [ -e ${OPTDIR}/bin/libffi.so.5 ] && cp -f ${SYNOPKG_PKGDEST}/bin/libffi.so.5 ${OPTDIR}/lib/
    + [ -e ${OPTDIR}/bin/libffi.so.5 ] && cp -f ${SYNOPKG_PKGDEST}/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/
    – [ -e ${OPTDIR}/bin/jna.jar ] && cp -f ${OPTDIR}/bin/jna.jar ${OPTDIR}/lib/
    + [ -e ${OPTDIR}/bin/jna-3.2.5.jar ] && cp -f ${OPTDIR}/bin/jna-3.2.5.jar ${OPTDIR}/lib || cp -f ${OPTDIR}/bin/jna.jar ${OPTDIR}/lib/

    #create or repair libffi.so.5 symlink if a DSM upgrade has removed it – PowerPC only
    if [ -e ${OPTDIR}/lib/libffi.so.5 ]; then

    Maybe you could incorporate these fixes in a new release.

    Reply
    1. patters's avatarpatters Post author

      Thanks for the tips. I’ve recently started a new job so I have only just caught up with moderating on here and noticed that my syno has not been backing up in a while.
      1) seems a little involved – and this scenario is only a problem because of the failures caused by 2) and 3)
      2) that’s Code42 changing things
      3) forgot that could result in a failure condition. I’m a little rusty but I can’t see how the package even worked at all on Intel with this issue.

      Reply
  47. George's avatarGeorge

    Crashplan has pushed an upgrade, 4.4.1_59, to my DS214se. I used the following steps to upgrade (thanks to Yves for documenting during 4.4.0/4.4.1 upgrade)

    Stop CP on NAS
    unzip -o /var/packages/CrashPlan/target/upgrade/1435726800441_59.jar “*.jar” -d /var/packages/CrashPlan/target/lib/
    unzip -o /var/packages/CrashPlan/target/upgrade/1435726800441_59.jar “lang/*” -d /var/packages/CrashPlan/target/

    mv /var/packages/CrashPlan/target/upgrade/1435726800441_59.whatevervalue/upgrade.sh /var/packages/CrashPlan/target/upgrade/1435726800441_59.whatevervalue/upgrade.sh.old

    –> NOTE THERE ARE SEVERAL DIRECTORY’S, YOU HAVE TO RUN THIS COMMAND FOR EVERY DIRECTORY !!!!! – George – you will have a directory for each failed attempt of automatic upgrade, so recommend keeping an eye on NAS CP log to see when your upgrade is downloaded. The sooner you catch it, the fewer directories you will have
    Start CP on NAS

    My upgrade was successful and my clients continued to be able to connect, and backup are running. Note I use CP on NAS as my backup server, I do not use CP Central

    Reply
    1. Richard's avatarRichard

      Rather than running the commands on some 20 plus directories, I decided to uninstall then re-install the Crashplan package. On the NAS,the package then starts immediately. After making the GUID change again, then connecting from the client and adopting the old backup, everything is working perfectly again.

      Reply
      1. Badbob001's avatarBadbob001

        When the usual method didn’t work anymore, I realized I had 50+ upgrade folders, all from the same version. I deleted all but the latest and now it’s OK.

      2. B. Goodman's avatarB. Goodman

        for f in ./*/upgrade.sh; do mv “$f” “$(dirname “$f”)/upgrade.sh.old” ; done

        From:
        http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/
        dSebastien offered up nearly the above, but it didn’t work until I added the
        ;done
        at the end.

        But once I had that part, it went through all the directories doing the move command and CrashPlan started right up.

        **WARNING, per BionicCat, you have to change the smart quotes here for regular quotes

      3. Jon's avatarJon

        I went down the same path of uninstalling and reinstalling, but after restarting, the CP service kept stopping and restarting when it was trying to back up to CP Central. Eventually I realized that my customized memory setting in /var/packages/CrashPlan/target/syno_package.vars had been overwritten by the reinstall, and after editing that file again and putting it back to 1536M, everything started working correctly again.

    2. Mike's avatarMike

      Anybody know the equivalent command line using 7z instead of unzip? DSM6 has dropped unzip in favor of 7z and I’m obviously doing something wrong as I can’t get it to extract correctly!

      Reply
    3. B. Goodman's avatarB. Goodman

      Sorry, this is a double-post, but I replied in the wrong place.
      Rather than running the move on every directory, instead use this command to handle them all:

      for f in ./*/upgrade.sh; do mv “$f” “$(dirname “$f”)/upgrade.sh.old” ; done

      From:
      http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/
      dSebastien offered up nearly the above, but it didn’t work until I added the
      ;done
      at the end. But once I had that part, it went through all the directories doing the move command and CrashPlan started right up.

      **WARNING, per BionicCat, you have to change the smart quotes to regular quotes

      Reply
  48. David Llewelyn's avatarDavid Llewelyn

    PLEASE HELP!! Can connect to the CrashPlan headless client on my Synology. Mac-side client immediately quits after logging in. Package Manager log just shows the CrashPlan service starting and stopping every minute or so for the last few days. Backups at 91%, so something has worked until now.

    Reply
    1. Jon Etkins's avatarJon Etkins

      I’ve had that happen from time to time. What has worked for me is to pause the backup, then go to Crashplan Central under Destinations and click Compress (or is it Compact, I forget.)

      Reply
      1. David Llewelyn's avatarDavid Llewelyn

        I had been avoiding that to reduce the overhead on the CPU, but at this stage it’s definitely worth a try.

        Thanks!

Leave a reply to sman Cancel reply