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. frillen's avatarfrillen

    Just for information at my DS209 after the upgrade from 3.2 I had to uninstall crashplan and the Java package, reboot and then reinstall java and then crashplan.

    Now it seems to work great again!!

    Reply
  2. Sylvain's avatarSylvain

    Hi, sorry it’s probably a dumb question but I’m pretty with crashplan and my NAS :s
    So i’ve installer crashplan on DSM 4.0-2198 and now what ?
    How do I start crashplan from my NAS and choose backup folder etc ?

    Reply
  3. Kevin43's avatarKevin43

    Great package and nice effort.
    I have a 1511+ and with the newest firmware 4. Crashplan was installed in 3.2 firmware and running like dream. After upgrade, I uninstalled and installed the packages and it was running again. Now I can not start the service. As soon as, I connect to it through a crashplan client, it working. I seems very strange. Is anybody exprerience the same. I have also tried to uninstall all packages, restart and install again. No luck.

    Reply
  4. Lars's avatarLars

    OK, this night Crashplan updated its client to a new version 3.15-2012 and that was also done automatically on my NAS. After the upgrade our package is no longer running or could be restarted.

    patters, it looks like you have some update to do, too? Or can we get it running again with any kind of manual work?

    Thanks, Lars

    Reply
  5. beber75's avatarbeber75

    Hi

    My crashplan just upgraded itself and wont start anymore. Here is what I could see in log

    Upgrades available at central.crashplan.com:443
    Downloading a new version of CrashPlan.
    Download of upgrade complete – version 3.15.2012.
    Installing upgrade – version 3.15.2012
    Upgrade installed – version 3.15.2012
    CrashPlan stopped

    Anyone have the same issue?

    Reply
    1. Richard's avatarRichard

      Same problem here. I uninstalled the package, then re-installed and it started for a while, then updated itself again and will not start!

      Reply
  6. Joerg's avatarJoerg

    As of tonight, CrashPlan autoupdates to a new version as soon as I try to connect to the headless 3.03. And this new version does not work anymore using your DSM package :( I can’t start it..

    Reply
  7. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

    I guess it can be startet manualy from terminal/ssh, but the easy way is for patters to update the package.

    @patters: Can you please please make an package for CrashPlan Pro too? Gona donate some $ if you do.

    Reply
  8. pisarm's avatarpisarm

    Hi – I seem to have the same problem as Lars – is there any info on getting it up and running again?

    Regards
    Flemming

    Reply
  9. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

    Trying to install CrashPlan Pro manualy from terminal but I cant get youre installation of Java to work.
    I like to use youre Java because of the none-US key patch in the installation, but I cant get CPP to detect it.
    I tried to add almost everything from “/volume1/@appstore/java6/jre/” and bellow to the “BINSLOC=” path line in CPP “install.sh” script……

    Reply
  10. Sam's avatarSam

    Hey, patters.

    First of all let me say thank you for this package, which I just discovered. Crashplan is a great service and I’ve been using it for a while now, but I installed it using the manual command line instructions in the Synology Wiki. I was wondering, what would be the correct steps to revert that installation, so that I can use your repo?
    That is, I want to get rid of Java, CrashPlan, and not sure if necessary, the ‘locale’ that I replaced as well, so that everything is ‘clean’ before installing the package.

    I also started having problems with CrashPlan – apparently I’m not the only one :) – since CrashPlan updated their software. Trying to run it manually I get:

    “DS1511> /etc/init.d/crashplan status
    Could not find JAR file /opt/crashplan/bin/../lib/com.backup42.desktop.jar”

    So, hopefully you can help me getting rid of what I have installed and hopefully a new package will come soon with the new version :)

    Cheers for all!
    Sam

    PS: Oh, also… I’m wondering what is the best procedure for DSM updates because of the locale, without messing up my backups. Are these correct?
    – ‘shutting’ down the CrashPlan package with the “Stop” button before upgrading DSM.
    – upgrade DSM
    – uninstall Java
    – install Java again
    – Run CrashPlan again.

    I just don’t want it to be messed up with my folder filenames with ‘foreign’ characters.

    Reply
    1. patters's avatarpatters Post author

      If you update DSM, you need to remove and reinstall my Java package to get locale support back. As for uninstalling a manual install of CrashPlan from the Synology wiki – search this page for the word ‘recipe’, I already wrote up a command sequence for someone else.

      Reply
  11. tpeixinho's avatartpeixinho

    What is your opinion about Tonido (http://www.tonido.com)? Do you think you can build a package with it?

    I now there’s Tonido Plug, but if we already a Syno, all that’s missing is the service on it!

    It would be awesome!!!

    PS: have you thought about a SANE server package? Having a scanner server solution would resolve the issue about connecting to our MFP from Linux/Mac.

    Reply
    1. patters's avatarpatters Post author

      Tonido is not open source, so I’m not really interested I’m afraid. It’s for Intel only, and I have an ARM syno.

      As for SANE, yes that does look potentially interesting.

      Reply
  12. Xerxes Battiwalla (@xerxesb)'s avatarXerxes Battiwalla (@xerxesb)

    Just to post an update – i created the symlink mentioned above by patters after the upgrade of both CP and DSM – the service wouldn’t start.

    I then uninstalled and re-installed the package through DSM and now the service has started on the DSM, but the agent can’t connect to the backup engine.

    in the OSX console, all i get from CrashPlan is:
    CrashPlan: kCGErrorInvalidConnection: CGSGetWindowTags: Invalid connection

    Reply
      1. Xerxes Battiwalla (@xerxesb)'s avatarXerxes Battiwalla (@xerxesb)

        it looks like the upgrade for CP failed….There’s an upgrade folder within @appstore/CrashPlan and the upgrade.log seems to show a number of “mv” commands failed (presumably they have the wrong syntax?)

        hope someone can pick up from here…i wont have an opportunity to look at it for a while yet :\

  13. patters's avatarpatters Post author

    I have updated the package to install CrashPlan 3.2.

    I don’t really have time to look into doing an upgrade since it would take a long time to discover what had changed and so on. I may do that later, but for now the easiest method is to uninstall, then install this new package, then adopt your old computer record once you’re done. Don’t forget to also upgrade the version of Crashplan on your client computer too.

    Reply
    1. Jason's avatarJason

      You beat me to it. I was just taking apart the package in an attempt to update it myself. Would you be willing to consider starting an official project somewhere such as google code or sourceforge? I, and I’m sure several others, would be willing to help maintain this package.

      Thank you for updating.

      Reply
    2. kevin.obrien's avatarkevin.obrien

      Patters, would you be willing to add Crashplan Pro package? The comment before you notes how to do this, but it requires all sorts of mods / bootstrapping / etc.

      Reply
      1. patters's avatarpatters Post author

        Just went to have a look at this and they don’t allow CrashPlan Pro outside of the US and Canada. Since I have no way of geo-locating visitors to my repo that would cause a lot of failed downloads and confused users, so it’s no for now I’m afraid…

      2. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

        “patters says:
        March 20, 2012 at 19:12
        Just went to have a look at this and they don’t allow CrashPlan Pro outside of the US and Canada. Since I have no way of geo-locating visitors to my repo that would cause a lot of failed downloads and confused users, so it’s no for now I’m afraid…”

        Where did you have that from? Here in Norway we have an company that works with Code42 to sell access to CPP storage on servers located here in Norway.
        Anyway, I don’t see the problem, because then you start CPP client for the first time (the ones from Crashplan.com) you need to provide an server URL to an CPP master server and if you don’t paying for this access you can’t use the CPP client at all.

        I guess that they here who wants an CPP package have this access already :)

      3. patters's avatarpatters Post author

        I quote:
        For CrashPlan PRO Online availability outside of the US and Canada, please contact:
        International Sales
        international@crashplanpro.com

        Since I’m not permitted to redistribute their software, that would make things a little complicated. Not to mention that I can’t even get the client to have a look at it.

      4. patters's avatarpatters Post author

        My other reservation is that it seems from these kinds of requests that people may be using my existing package for protecting mission-critical business data. As an IT pro, I personally wouldn’t risk that on a package some guy on the internet may or may not continue to maintain, which may or may not work 100% (since it’s not supported by Code 42), etc. My making a CP Pro package would only encourage that, which I’m not entirely comfortable with.

      5. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

        Well, I can see that.
        At my work, we are testing CPP on Synology for an customer, installed using IPKG and you’re java package :) So far working 100%.
        By fair I don’t see any clear reason why it should not work, because the linux version is Code42 official, but as usual then it comes to enterprises and Linux, nothing is official supported unless it runs on RedHat enterprise, Suse enterprise and so on.

        Im not sure if Ubuntu server is on the official list of some linux products for enterprise, but I know many companies use Ubuntu.

        But I see you’re point and we who wants to run CPP are maybe pro enough to make it work fine anyway :)

    3. Paul Goldsmith's avatarPaul Goldsmith

      libmd5.so appears to be the wrong version on my DS411J (ARMv5 Kirkwood)

      java.lang.UnsatisfiedLinkError: /volume1/@appstore/CrashPlan/libmd5.so: /volume1/@appstore/CrashPlan/libmd5.so: cannot open shared object file: No such file or directory (Possible cause: can’t load IA 32-bit .so on a ARM-bit platform)
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)

      I googled around to try to find a precompiled binary for this platform, but no dice.

      Thoughts?

      Reply
      1. patters's avatarpatters Post author

        I didn’t really have a chance to do much testing, and now I also see that problem on mine. :(
        I guess I’ll have to take the package down until I have time to compile libmd5 on ARM.

      2. patters's avatarpatters Post author

        The libmd5 problem is reported in log/engine_error.log on ARM systems. I have just tried to compile libmd5.so from the libwww sources but it now looks like there’s some other dependency problem. I’m busy tonight so I’ll need to take a look tomorrow. I have taken down the ARM version of the package from the repo until I can fix it…

    4. Richard's avatarRichard

      It works also again on the DS1812+ DSM3.2 combination.
      Installation comes with an error message when installing the package, but after reboot it works really fine again!!

      Reply
      1. patters's avatarpatters Post author

        I removed it on purpose since it won’t work properly until I can get libmd5.so compiled for ARM CPUs. All the libraries included in the installer from crashplan.com are for Intel.

      2. patters's avatarpatters Post author

        I’ve got libmd5.so compiled by compiling W3C’s libwww. However, CrashPlan still doesn’t seem to like it. I get this in the log:
        java.lang.UnsatisfiedLinkError: com.twmacinta.util.MD5.Transform_native([I[BII)V

        which makes me think it wasn’t compiled properly.

        Trying to get bootstrapped and get the dev tools on DSM 4.0 seems to be quite a mess. I do see some compilation errors like this:
        sh: yes: unknown operand

        *** Warning: linker path does not have real file for library -ldl.
        *** I have the capability to make that library automatically link in when
        *** you link to this library. But I can only do this if you have a
        *** shared version of the library, which you do not appear to have
        *** because I did check the linker path looking for a file starting
        *** with libdl and none of the candidates passed a file format test
        *** using a file magic. Last file checked: /usr/lib/libdl.so.2
        *** The inter-library dependencies that have been dropped here will be
        *** automatically added whenever a program is linked with this library
        *** or is declared to -dlopen it.
        sh: yes: unknown operand

        I tried explicitly adding /opt/arm-none-linux-gnueabi/lib to the LDFLAGS options (so it definitely had libdl.so but that makes no difference. I was trying to compile libwww 5.4 which is the only tar bundle. I thought the CVS version might be newer but trying to follow the bootstrap instructions results in errors at the “aclocal; autoheader; automake; autoconf” part.

        So I’m pretty stuck for the moment. Advice welcome!

  14. schmeel's avatarschmeel

    /donate -now

    (folks take note of the unobtrusive “Support my work” link patters has waaaay up on the page)

    Thanks patters for an excellent package and an unexpected level of support. Here’s hoping the libmd5 issue is solved soon!

    Reply
  15. ppollet's avatarppollet

    is it possible to have a link to the .spk file, when I uninstalled the package, it never appeared again in the list of installable package ;-(

    Reply
  16. TwilightNL's avatarTwilightNL

    I was using this great package until it automatic updated and was not working anymore. Removed it and want to install it again but its not in the packages list anymore. More people got this problem?

    Reply
  17. Sylvain's avatarSylvain

    Hi again,
    I’m very sorry, but I still can’t figure out how to make CP work on my NAS… I’ve installed java, and installed the CP package. How to run the service ?
    Now what should I do ?
    Please someone help me here, I’m new with CP and Synology…

    Reply
  18. Chris's avatarChris

    Patters: I had CP up and working on my DS411slim and DS4.0 but when I was messing around with trying to get PS3mediaserver working it somehow killed it. I decided to uninstall and reinstall your CP package, but after unintall, the package is not showing in the list of packages available. I have Java7 installed and can see Java6 in your repository, so it is connecting and listing the packages.

    Any ideas why it doesnt show? Perhaps the DS has not removed CP from the list of installed packages properly, so it thinks I already have it?

    As I am just setting up my NAS, I could wipe it clean again, but dont have a USB SATA caddy, is there any way to reforce the DS to clean install without removing the disks from it?

    Reply
  19. Chris's avatarChris

    Ah I see Patters reply above about ARM compile issues. Hope they get sorted soon, it was working fine for me on the face of it (ie it would back up files at 1am as expected and didnt report any errors in the front end) but hadnt looked at the logs.

    Good luck fixing it, excellent work so far

    Reply
  20. Aron Silverton's avatarAron Silverton

    Hi Patters,

    I’m not yet using your package on my DS1010+ as I originally installed the Linux version from CrashPlan’s site.

    However, it just failed a self-update and I suspect that this may be an issue for your package as well.

    I was able to fix this and manually rerun the upgrade.sh script. The biggest issues were using invalid command arguments for rm, mv, and ps and/or not using the /opt/bin Busybox. (Really need to get a modern Busybox in optware for Synology. . .)

    Anyway, wanted to let you know that it should be straightforward for you incorporate the necessary steps from upgrade.sh into your package to facilitate an upgrade package option. I’m not sure how you go about stopping CrashPlan from attempting to self-update and failing, but there’s probably a config file option for that.

    The built-in upgrade process involves CP downloading a .jar to crashplan/upgrade that has all of the necessary files. I was able to archive mine before the upgrade cleaned up after itself if you’d like it for analysis.

    Hope to move to your package when I do my DSM 4.0 upgrade. If so, donation will follow. Keep up the good work.

    -A

    Reply
  21. patters's avatarpatters Post author

    Another update on the libmd5 problem on ARM CPUs…

    By running objdump -x on the library, and comparing the output for the supplied Intel one against the output for my ARM native compile, I can see a mention of this function “Java_com_twmacinta_util_MD5_Transform_1native” in the Intel one, but not in the ARM one (this is the same function which is reported as missing in the error log when I use the ARM compile of libwww’s libmd5.so):

    00001e40 g O *ABS* 00000000 _DYNAMIC
    00000620 g F .text 000007c4 Java_com_twmacinta_util_MD5_Transform_1native
    0000050c g F .init 00000000 _init
    00001f34 g *ABS* 00000000 __bss_start
    00000e18 g F .fini 00000000 _fini

    So it looks like this library from CrashPlan might have some special hook in it for a function they invoke from the Java application. I’m no developer so I could be wrong, but does anyone else have an idea about this?

    Googling around, perhaps it’s a special version of md5 – like this one perhaps:
    http://www.twmacinta.com/myjava/fast_md5.php

    If so, I have no idea how to compile that into a .so library file.

    EDIT. Aha! It looks like all my suspicions above were correct. There are compilation instructions in the comments in http://www.twmacinta.com/myjava/MD5_solaris_contrib.c . Am going out now, but I’ll try and compile it in a few hours.

    Reply
    1. patters's avatarpatters Post author

      Right, I can’t compile this because I need an ARM JDK, which Oracle doesn’t supply. I guess it might be possible using the OpenJDK, but I tried compiling that before once and ran into difficulty (IIRC it requires a newer glibc or gcc than the Syno toolchain uses).

      But since I’ve read that this library’s only purpose is to provide a faster MD5 function than the native Java one, and since CrashPlan seems to run without it – I have to conclude that it’s probably fine without it, just slower. I would guess that the code falls back to the native method. I’ll ask the question on the CrashPlan forums. So for now I’ll re-enable the ARM package on the repo. If anyone can compile the library, let me know and I’ll include it in the package.

      Reply
      1. patters's avatarpatters Post author

        After a little bit more tinkering, I discovered that I could indeed compile Tim Macinta’s fast-md5 libmd5.so using the headers from the OpenJDK that I downloaded in a Ubuntu VM. CrashPlan now starts with no errors in log/engine_error.log. Success at last! The updated ARM package is now live on the repo.

        Oh and thanks very much to the people that donated yesterday :)

  22. Paul Goldsmith's avatarPaul Goldsmith

    Much appreciated for the hard work on this.

    Just tried uninstalling and reinstalling it on my DS411J (on DSM 3.2) and I don’t appear to see all of the expected files (and no CrashPlanEngine in bin)

    volume1/@appstore/CrashPlan $ ls -la
    drwxr-xr-x 3 crashpla root 4096 Mar 17 22:21 .
    drwxr-xr-x 4 root root 4096 Mar 17 22:21 ..
    drwxr-xr-x 2 crashpla root 4096 Mar 17 22:21 bin
    -rw-r–r– 1 crashpla root 217 Mar 17 22:21 install.vars
    -rw-rw-rw- 1 crashpla root 49904 Jan 29 11:50 lib
    -rw-rw-rw- 1 crashpla root 125833 Jan 29 11:50 libjtux.so
    -rw-r–r– 1 crashpla root 7412 Mar 17 21:46 libmd5.so

    Reply
    1. patters's avatarpatters Post author

      Not sure. I just tested this process on mine so the package is good. Maybe there was a problem downloading the installer bundle from crashplan.com. Restart your NAS to clear out the temp folders and try again perhaps.

      Reply
      1. Paul Goldsmith's avatarPaul Goldsmith

        Good man, that did it. My engine_error.log also now empty.

        Awesome job, donation incoming!

      2. frillen's avatarfrillen

        Thanks, it seems to be up running again.

        But maybe there is a issue?

        It seems like the folder size is calculated a bit different with the update?

        Eg a folder size was 5,3gb before now it say 5,7gb.

        Another 193gb now 207,5gb etc…

        Am I the only one with that issue?

  23. allride's avatarallride

    DSM 4.0, uninstalled java package and CrashPlan. Reinstalled and rebooted. Completed the adoption, Now CrashPlan central stuck waiting for connection, tried to reconnect several times, unsuccessfully.
    Was working before I upgraded Synology DS211 to 4.0
    Any suggestions.

    Reply
    1. TwilightNL's avatarTwilightNL

      Got the same problem with new package, but also had this problem sometimes with the old package. Only solution i found was waiting 12 hours, then it automaticly fixed/connected.

      Reply
  24. Jeff's avatarJeff

    DSM 4 and Crashplan 3.2 broke my manual install…then I found this method…….AWESOME!

    I will be donating shortly – great work!

    Reply
  25. Chris's avatarChris

    Think we may have a new problem, I keep getting this stopping hibernation

    Mar 18 19:20:45 kernel: [127167.980000] [/volume1/@appstore/CrashPlan/conf/default.service.xml] opened by pid 30082 [u:(/volume1/@appstore/java7/jre/bi), comm:(java)]

    If I stop the CrashPlan service via Package Manager, it all hibernates ok. In CrashPlan I have it not to watch filesyste and only check for new files at 00:01am when I do the actual backup. This used to work and it would hibernate.

    Any ideas?

    Reply
    1. patters's avatarpatters Post author

      Not sure there’s anything I can do about this. I presume any differences in behaviour will be down to CrashPlan since I changed very little in the syno package. I have other things which prevent hibernation on my NAS (Serviio) so I haven’t really investigated the issue.

      Reply
      1. Chris's avatarChris

        Yes I think it is new behaviour in CrashPlan itself. Was hoping maybe there was a hack to stop it reading that file that might need to be applied (and was maybe missed). No such luck by the sounds of it. Shame as the old version worked fine.

        Does CrashPlan have good support? I’m currently using the free trial period but was going to sign up if we could make it work. I might try their customer support as their forum apears to be a bit rubbish. Hopefully there is an option to turn it off.

        Would using remount and noatime solve it perhaps? Its a sod that it reads it so often, like every few minutes.

      2. patters's avatarpatters Post author

        Further up in the comments a guy had a solution to use a cron job to activate and de-activate the service between certain time windows for this very reason, you could try that.
        Not sure about the support, but I agree the forums seem really stale.
        I’m paying the monthly amount for unlimited data (though I’m barely backing anything up at present). It does seem insanely cheap at £3pcm.

      3. Chris's avatarChris

        I did think about using cron, and hadnt seen the post further up, thanks for the heads up.

      4. plecik's avatarplecik

        I’ve contacted Crashplans’ support about the access to default.service.xml, but as this is unsupported configuration they refused any help :(
        So I suppose there is no other fix than crond suggested by others to use hibernation. Shame…

  26. Anthony B.'s avatarAnthony B.

    I have install DSM 4.0 and Crashplan 3.2 but i have two problem

    1) If i reboot my synology and i launch my crashplan client (with a tunnel ssh -L 4200:localhost:4243 root@ip) i must reconfig my headless :-(

    2) When i want start my backup, i have this message:
    Destination unavailable – backup location is not accessible
    To do : 1 files
    Completed: 0 files
    Last backup : initial backup not complete.

    ideas???

    Reply
    1. patters's avatarpatters Post author

      Did you make sure that the crashplan user account has read permissions on the folders you selected to backup?
      As for the loss of settings following a reboot – are you running on Intel or ARM? So far I think only Intel users have reported this.

      Reply
      1. Anthony B.'s avatarAnthony B.

        For the second point now everything is ok, i create a tunnel with root and is bad because i have no root account only admin account, so i have create my tunnel with my admin account “ssh -L 4200:localhost:4243 admin@ip” and now my backup done

        For the first point, i have a DS210j so ARM processor, have you a solution?

      2. Richard's avatarRichard

        Do you make a connectioon from inside your own network? Or from outside?

        If your inside, you don’t have to make the tunnel, just change the ui.properties document. And you can connect directly to your crashplan on your DS

      3. Anthony B.'s avatarAnthony B.

        Ok thanks, and for my first point, i think install a crashplan manually for testing.

  27. pisarm's avatarpisarm

    I uninstalled the Crashplan package on DSM 4.0, reinstalled it and tried letting a friend do a backup to me – it just says “Disconnected” and in the log I get “Not ready for backup from friend. Reason: The destination is not available”.

    The crashplan user has full rights to \volume1\crashplan\backupArchives it created the needed directory containing files, the backup just never starts.

    Any ideas as to what might be the cause?

    Reply
  28. nullreturned's avatarnullreturned

    So I just had to update to Crashplan 3.2, and it wasn’t a surprise that after the upgrade, it was like a whole new system. I tried following the instructions for using the “adopt” function, but it kept reporting network issues. I’m not sure if something isn’t setup right between the Synology 712+ and my Firewall/Router, but that’s beyond the point.

    So in an attempt to find a solution, I found a method even better than using the “adopt” function post update. As you know, the system is given a new GUID. Well, what you can do is change the new GUID to your old one, and blammo, it works again. To do this, you need to:

    1.) Log into your Crashplan Account to find the GUID of the old Installation. You can tell which one is it because it won’t have checked in for a while.
    2.) Connect to the headless client as normal.
    3.) Double click on the Crashplan Logo on the top right of the console. This will bring up the command line interface.
    4.) In the command line, enter in “guid ” and hit enter. It should exit the Command Line and bring you back to just the Interface.
    5.) Exit and re-connect to the headless client. It should now be able to backup as usual. To check if it worked, you can go back into the Command Line and just type in “guid” and hit enter. This will display your current GUID and it should be the old one.

    Enjoy and I hope this helps people!

    Reply
    1. Ronald's avatarRonald

      What about the backup Archives after starting, I have 160 GB of archives… should I attach them or should I set the Backup archive dir ?

      Thx,
      KAR

      Reply
      1. patters's avatarpatters Post author

        You can verify the backup archives path in the client: Settings -> General -> Configure…
        It should already be set to /volume1/crashplan/backupArchives

        If they’re not showing up then I’m not sure what the recommended action is – I’m afraid I only back up to CrashPlan Central. I think I read somewhere that you can re-attach though.

      2. nullreturned's avatarnullreturned

        That’s the trick. The archive location should be a directory that is the GUID of the computer being backed up. So as long as the base directory is the same (and it should after the upgrade) then it knows where it should go. When I replaced the GUID from the new one to the original one, it was like nothing changed. It continued the backup how it should, as if nothing happened.

        I have about 200 Gigs of archive data, and after doing the GUID replacement (or I should say reinstatement) it was like nothing changed. It literally started doing the pending backup as if I was stupid and turned off the NAS.

  29. Fezz's avatarFezz

    Could someone host a copy of the new libmd5.so to help out us on the Netgear Stora which also has the ARM architecture. Thx

    fezz

    Reply
  30. Fezz's avatarFezz

    Hi

    Thanks. I compiled a different version last night which didn’t work. So I will try this. Thx heaps.

    Reply
      1. patters's avatarpatters Post author

        Cool. As you probably read, it’s not the stock md5 library – it’s a special fast one which is designed to be hooked from Java apps.

  31. James Bery's avatarJames Bery

    I installed crashplan by hand, and upgraded it to 3.2 by manually fixing and running the upgrade script on my ds1812

    I get an engine_error.log:

    java.lang.UnsatisfiedLinkError: /volume1/opt/crashplan/libmd564.so: /volume1/opt/crashplan/libmd564.so: ELF file OS ABI invalid

    My kernel is definately 64 bit – uname -m says x86_64

    Does this package fix solve this error? (I don’t want to re-install crashplan if I don’t have to, would prefer to swap the library out)

    Reply
      1. Richard's avatarRichard

        My package works with the automated install from Patters…
        No problem.. found in what so… error-log

        system DS1812+ / DSM4

  32. patters's avatarpatters Post author

    Good news regarding future package upgrades, I can confirm that I can now successfully migrate the machine identity (GUID etc.) by retaining the content in /volume1/homes/crashplan/.crashplan so future upgrades will be less of an impact.

    Reply
  33. Matthijs Haverink's avatarMatthijs Haverink

    Works like a charm, thanks !

    I upgraded from the manual Kenneth-install on DSM 3.* to your package on DSM 4.0 final.

    I used the adopt and everything is back to normal; incoming and outgoing backups to friends.

    Reply
  34. patters's avatarpatters Post author

    Ok – CrashPlan PRO packages for ARM and Intel are live on the repo. I realised that the download can be obtained regardless of territory, but you only seem to be able to sign up for the free 30 day trial in the USA and Canada. Once downloaded, I could see that it was essentially almost identical in setup to the ordinary CrashPlan, so I made these packages. There are no new instructions, everything on this blog post applies to PRO as well. I haven’t been able to actually test them though, since I can’t sign up :)

    Reply
    1. Sven's avatarSven

      Hi patters,
      the difference between CrashPlan and CrashPlanPro is the following:
      CrashPlan saves only to the servers of CrashPlan (Code42). The destination server address is “hard coded”.

      CrashPlanPro is used with own CrashPlanPro(e)-servers. So the destination has to be filled by the user while entering his account settings (if no included in modified CPPro client installers).

      Anybody can download the CrashPlanPro-Client, but he needs an own CrashPlanPro-Server or needs a CrashPlanPro service provider. I am serving such a CrashPlanPro(e)-Service in Germany.

      About Your CPPro-package: The installation does not work! The package says “downloading” and stops instantly with just the message “download failed”.
      The log file of my DS411+ shows:
      PkgSynoMan.cgi: PkgSynoMan.cpp:336 Failed to download package, httpResponseCode=404

      What is downloaded? The CPPro-Client? What download path did You use for the download?
      It should be http://download.crashplan.com/installs/linux/install/CrashPlanPRO/CrashPlanPRO_2010-03-08_Linux.tgz.

      I am new to the DSM4.0-package system. Where can i find the package and modify the path?

      The installation of the Java SE is also impossible, because Oracle isn’t able to send the download link via mail (I tried 6 different mail accounts at different providers).

      Thanks in advance

      Sven

      Reply
      1. Sven's avatarSven

        correction, after 6 hours Oracle was able to send the download-link

        maybe I overread something here in this long thread:
        What I did:
        a) download CPPro-Client (Linux) to public
        b) download Java SE from Oracle to public
        c) download gcc420_glibc236_x64-GPL.tgz to public
        d) download gcc420_glibc236_pineview.tgz to public
        (I don’t know which one is needed)
        e) Installed Java SE via Package Manager
        f) Installed CPPro via PackageManager

        Everything worked so far.
        As mentioned in the notes, I stopped the CrashPlanPro via the PackageManger and started it again. But I can`t connect to the CrashPlanPro-Engine with my CrashPlanPro Client on another machine. I get the message “Critical Error: CrashPlan has been disconnected from the backup engine”.
        (I had CrashPlanPro running on the Synology before, but hat some problems with the UTF-8-manipulation (sometimes worked, sometimes not). I also wanted to try it on a “fresh” DSM 4.0.)

        Something is wrong with the CPPro installation on the Synology, because the Client-Window is different. It is a mixture of the CrashPlan and the CrashPlanPro-Client-window (Color (green) is from CrashPlan, Icon from CrashPlanPro.
        see screenshot here: http://www.oecherwolke.de/errors/CPProError1.jpg

        I had a look in the configuration (in /volume1/@appstore/CrashPlanPro/conf/my.services.xml) and there is something wrong:
        It shows:

        This is the address if You are using CrashPlan, with CrashPlanPro this address is filled on the first login with the client to the service providers address.
        It looks like, You put the my.services.xml and default.services.xml from a CrashPlan installation to a CrashPlanPro installation. This is an error.
        I will try and change the .xml-files now manually to see if the system is working after this modifications.

        Sven

      2. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

        I got the same error here.
        Tried to change the server address in the 2 xml files but that didn’t work, same error.

        I can have something to do with that the Linux client now have been updated to version 3.2 but the client I use on my mac for CPP is 3.8.2010

        As far as I know the server and client version need to be the same, so I guess I have to talk to my CPP provider about this. Then I tried this with the bootstrap method last week, the linux client was not updated to version 3.2 if I remember right.

        I tried to install the Linux client on an clean Ubuntu install now, and it don’t ask for an master server anymore…..

      3. Sven's avatarSven

        Hi Svein,
        i did the following and got it working now:

        Installed the Java SE-package
        Installed the *new* CrashPlanPro e package which is available now

        You need to correct one wrong entry in the my.services.xml-file

        nano /volume1/@appstore/CrashPlanPROe/conf/my.service.xml

        change
        127.0.0.1

        to

        0.0.0.0

        save
        restart CrashPlanPro e from the package manager. Is working!

        Sven

      4. patters's avatarpatters Post author

        My script changes that entry automatically the second time you start the package in Package Center. It can’t do it the first time because the xml file doesn’t yet exist.

      5. Sven's avatarSven

        Hi Svein,
        I couldn’t connect to the CPEngine on the Synology.
        But I tried again and and now it is working.

        Many many many many thanks patters… phantastic work!!

        Sven

      6. Sven's avatarSven

        ok, one new problem occurs:
        I had CrashPlanProe (CPPe) on a Synology running (with DSM 3.2)
        I have sent quite a lot of files to the CrashPlan-Server
        No with DSM 4.0 on the same machine with the CPPe-client from the package, the Synology isn’t adopting the files on the server (there is no adopt function in CPPe, like the CrashPlan and CrashPlanPro-versions have it).
        The manual installation creates a .identity-file in /var/lib. But this is not used by the package version, a new installed manual version does use this file and just continues the backup.

        But I have one big problem, I can’t solve.
        The manual version is only using the Java SE (UTF-8)-support, if startet in a ssh-session. If I start the Synology and CPPe starts automatically, it does not support UTF-8.
        But if I start CPPe via the ssh-session and close this session, the CPPe also stopps.

        Manual start is done via /etc/init.d/crashplan start

        Anyone have an idea how to solve this UTF-8-problem?

        Many thanks in advance

        Sven

      7. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

        @patters: that explains why I didn’t get anny errors, because I was following the book :D

        @Sven: The UTF-8 is fixed if you use patters Java package instead of an manual install because patters package takes care of the UTF-8 stuff :)
        I reinstalled/reset my NAS 2 days ago to be sure I got rid of all the stuff I did with bootstrap and IPKG and have since just used the packages from patters and stuff is working :D

  35. SAL's avatarSAL

    Your Java and especially CrashPlan packages are a huge timesaver for me. I’d like to be able to compensate you for the fact that I have benefited from your labors (whereas previously I was doing this manually and following my own little guide to get CrashPlan working every time I upgraded DSM – including compiling all the various ARM libs …). Is there a preferred PayPal or other payment service where you are comfortable accepting “gratitude payments” from happy users :-) On the order of a drink or two :-)

    Reply
    1. patters's avatarpatters Post author

      Absolutely! there’s a PayPal button at the bottom of the right-hand column of the page – scroll back up to the top ;)

      Reply
  36. desq's avatardesq

    Perhaps you should also consider pasting a flattr-button on your page. Your labor for the crashplan-package should be compensated.

    Reply
  37. Sven's avatarSven

    The Java SE for Embedded 6 shows as state: “stopped”, so CrashPlanPro can not run…

    Any idea, where to look for a solution?

    I didn’t change anything on the Java SE after installation via package manager

    Sven

    Reply
  38. JJ's avatarJJ

    Hey everyone, just a little confused as to what steps I should take so as to ensure Crashplan resumes backing up from where it left off.

    At the moment I have not upgraded the server and Crashplan is reporting nothing being backed up for 7+ days. I have a Synology DS411+II. Should I uninstall then reinstall it vai this package? How do I ensure that it “adopts” my old settings?

    Thanks in advance!

    Reply
    1. patters's avatarpatters Post author

      If you upgrade through Package Centre your machine identity will be preserved. You will need to stop and restart the package a second time before you can connect a client. Then enter your CP login and it will pick up where it left off.

      Reply
      1. JJ's avatarJJ

        Ah, I should clarify that the current installation is not the package, but rather installed as per the instructions on Kenneth Larson’s blog. Does that make a difference as to what I should do?

      2. patters's avatarpatters Post author

        Yeah, that’s more complex. Search these comments page for the word ‘recipe’ to find out how to uninstall the old version. Then reverse what you did to install Java.
        Install my packages, following the instructions then adopt your old computer. Things are more tricky still if you backed up /to/ your syno, because there’s data you need to salvage first. Did you?

      3. JJ's avatarJJ

        When you say reverse what I did to install java, do you mean uninstall java? If so, um, how?

        Also, I’m using crashplan pro, but I never set a destination server. I’m using the one that crashplan sells direct and saves to their servers. The one that they charge $7.49 per month for unlimited storage. Oh and although it says available only in the Us and Canada, it allows you to enter in a different country in the payment screen and accepts overseas credit cards.

        And, I will make a PayPal donation for all your help. Thanks so much,

  39. Kevin's avatarKevin

    Hi there
    Downloaded the latest package , Java is running no problem there (version 1.6) on the DS1511

    Added Servicehost of NAS to my PC/Mac ui.properties and restarted client GUI (crashplan user on nas only has access to a 10GB photo folder for testing first of all)

    on the engine output put I have this in the log and Client is also unable to connect :(
    [03.23.12 23:32:47.735 INFO main root ] Adding shutdown hook.
    [03.23.12 23:32:47.741 INFO main root ] BEGIN Copy Custom, waitForCustom=false
    [03.23.12 23:32:47.741 INFO main root ] NOT waiting for custom skin to appear in custom or .Custom
    [03.23.12 23:32:47.742 INFO main root ] No custom skin to copy from null
    [03.23.12 23:32:47.742 INFO main root ] END Copy Custom
    [03.23.12 23:32:47.757 INFO main root ] BEGIN Loading Configuration
    [03.23.12 23:32:47.909 INFO main root ] Loading from default: /volume1/@appstore/CrashPlan/conf/default.service.xml
    md5 Loaded.
    [03.23.12 23:32:48.208 INFO main root ] Loading from my xml file=conf/my.service.xml
    [03.23.12 23:32:48.345 INFO main root ] Loading ServiceConfig, newInstall=false, version=3, configDateMs=null, installVersion=1331787601320
    [03.23.12 23:32:48.347 INFO main root ] OS = Linux
    [03.23.12 23:32:48.542 INFO main root ] AuthorityLocation@2272087[ location=central.crashplan.com:443, hideAddress=false ]
    [03.23.12 23:32:48.546 INFO main root ] END Loading Configuration
    DELETED file=conf/service.model
    FAILED to delete file=conf/service.login
    FAILED to delete file=/volume1/@appstore/CrashPlan/conf/import_key
    FAILED to delete file=conf/service.copier
    CACHE DELETED cacheDir=/volume1/@appstore/CrashPlan/cache
    [03.23.12 23:32:49.807 INFO main root ] BEGIN Loading Configuration
    [03.23.12 23:32:49.808 INFO main root ] CpsFoldersMigrate is not necessary. /volume1/@appstore/CrashPlan/conf/my.service.xml file does not exists.
    [03.23.12 23:32:49.809 INFO main root ] Loading from default: /volume1/@appstore/CrashPlan/conf/default.service.xml
    [03.23.12 23:32:49.851 INFO main root ] Loading ServiceConfig, newInstall=true, version=3, configDateMs=null, installVersion=1331787601320
    [03.23.12 23:32:49.852 INFO main root ] OS = Linux
    [03.23.12 23:32:49.852 INFO main root ] Initializing backup paths last modified to now. lastModified=1
    [03.23.12 23:32:49.947 INFO main root ] AuthorityLocation@9472129[ location=central.crashplan.com:443, hideAddress=false ]
    [03.23.12 23:32:50.012 INFO main root ] END Loading Configuration
    jtux Loaded.

    Thanks

    Reply
    1. Kevin's avatarKevin

      Oh .. Over SSH tunnel the client connects to NAS without a problem using the default settings from CrashPlan

      Reply
  40. Sven's avatarSven

    ok, one new problem occurs:
    I had CrashPlanProe (CPPe) on a Synology running (with DSM 3.2)
    I have sent quite a lot of files to the CrashPlan-Server
    No with DSM 4.0 on the same machine with the CPPe-client from the package, the Synology isn’t adopting the files on the server (there is no adopt function in CPPe, like the CrashPlan and CrashPlanPro-versions have it).
    The manual installation creates a .identity-file in /var/lib. But this is not used by the package version, a new installed manual version does use this file and just continues the backup.

    But I have one big problem, I can’t solve.
    The manual version is only using the Java SE (UTF-8)-support, if startet in a ssh-session. If I start the Synology and CPPe starts automatically, it does not support UTF-8.
    But if I start CPPe via the ssh-session and close this session, the CPPe also stopps.

    Manual start is done via /etc/init.d/crashplan start

    Anyone have an idea how to solve this UTF-8-problem?

    Many thanks in advance

    Sven

    Reply
    1. Svein Arild Kristiansen's avatarSvein Arild Kristiansen

      The UTF-8 is fixed if you use patters Java package instead of an manual install because patters package takes care of the UTF-8 stuff :)
      I reinstalled/reset my NAS 2 days ago to be sure I got rid of all the stuff I did with bootstrap and IPKG and have since just used the packages from patters and stuff is working :D

      I yust tested with an folder and an text document containing lots of øæå and it worked to backup and restore it :)

      The PROe don’t have an adopt button, last time I needed to connect an reinstalled computer to the same backup repo (because, if you don’t delete the computer in CP/CPP/CPPe the backup already taken is not deleted) I had to find the CPPe GUID of the old install, dubbelclick on theCP logo and type in “guid +old GUID” after an restart of the client the was connected to the old backup.
      The how to is here: http://support.crashplanpro.com/doku.php/recipe/reconnect_to_an_existing_backup

      Im my case I could not get the GUID from the install because the computer already was wiped, but I got it from my CPPe provider.

      Reply
      1. Sven's avatarSven

        Hi Svein,
        new 412+
        clean install of DSM 4.0
        downloaded the Java, Tools-Chain and CrashPlanProe-Linux-Client to the public folder, just copied the files via AFP to the newly created public-folder.

        added the package-source of pcloadletter
        installed java-package via package-manager-gui (ended up with error (could not be installed, but shows as installed)
        installed CrashPlanPROe-Client via package-manager-gui
        shows running
        but netstat doesn`t show any process of CrashPlan.
        The my.service.xml shows

        127.0.0.1

        I changed that to 0.0.0.0
        But no connection from the CPPROe-GUI on my Mac…
        Restarting the CPPROe-service on the Synology (via Package-manager-gui).
        the my.service.xml-file is again set up to 127.0.0.1.
        Also changing the ownership of this file to 555 doesn’t stop that, the file is deleted and recreated.

        any ideas?

        Thanks in advance

        Sven

      2. Sven's avatarSven

        Hi Svein,
        many many thanks for the tip with the adopting in CPPROe… it looks, like it is working! I haven’t found this info, because it was only shown in the CPPRO-Support.
        It is sometimes quite annoying that CP does not provide this infos at all places.

      3. Sven's avatarSven

        Hi Svein,
        the adopting is working, but the client seems to “forget” its GUID after a reboot.
        If the NAS has to be rebooted, it starts with the “Welcome”-Screen and I have to adopt the backup archive again.
        I think there must be something wrong with the start script, it resets some values on every restart of the service.

      4. patters's avatarpatters Post author

        Look at the start script – it’s on this blog post. It only resets the IP binding. If you’re having resets then something else is wrong. Do the engine logs offer any clues?

  41. Paul Johansen's avatarPaul Johansen

    I am on a 1511+ and this is working great! I used the “recipe” script in the comments to clean up my old hacked in install, upgraded to DSM 4 and installed the package.

    I did run into the issue mentioned above where the serviceHost in my.service.xml had reverted back to 127.0.0.1 so I couldn’t connect without using the tunneling method. Once I changed that back to 0.0.0.0 I had no issues connecting. The change survived service stops and starts as well as a full NAS restart so I think it is sticking just fine.

    Thanks for your awesome work and all the support you provide to everyone using your work! Donation on its way!

    Reply
    1. patters's avatarpatters Post author

      When that field in my.service.xml got turned back to 127.0.0.1 did it also reset the location of the friends backups to the application’s own (i.e. did it completely rebuild the file)?

      I had thought of forcing that modification it every restart of the service, but I figured that if the file is being reset to defaults each reboot then you’ve got bigger problems that we need to track down.

      Reply
      1. Paul Johansen's avatarPaul Johansen

        No, it didn’t appear to. For instance here is one of my family members backups and it was unmodified and in my custom location:

        440005622640410726
        /volume1/Backups/FamilyCrashPlan/Mom and Dad
        false
        -1

Leave a reply to Anthony B. Cancel reply