Suresh Payankannur

Friday, July 17, 2015

Upgrading CrashPlan App on Qnap TS-251

I started to notice lately that my Qnap is not backing up to CrashPlan. I had set up my Qnap TS-251 and have Qnap app properly installed and configured. It was backing up properly, but for the last couple of months it has not been backing up, even though there are data changes in my NAS. Digging further, I noticed CrashPlan app tries to upgrade to a new version and the upgrade is failing. Backup was not happening when there is a pending upgrade.

When ever I tried to do an upgrade from the UI, CrashPlan service completely stops. I had to manually restart the CrashPlan service, but then it will go back to do the upgrade!!

Digging further, I noticed that there are issues with the upgrade script and it fails. I had to do the following steps to upgrade the Qnap app and restart my backup.

Environment

  • Qnap Version: TS-251 4.1.4 (2015/05/22)
  • CrashPlan app version: 4.2.0_35

Upgrading CrashPlan App

The following steps were needed to this upgrade working

  1. Start the CrashPlan app using the Qnap UI
  2. ssh to the Qnap Server
  3. Stop the CrashPlan service
  4. Modify the config file
  5. Modify the startup script
  6. Change the upgrade script
  7. Manually run the upgrade script(s)
  8. Stop the service using Qnap UI
  9. Modify the config file
  10. Start the CrashPlan app from Qnap UI
  11. Configure the client
  12. Adopt the existing computer if needed
  13. Start the backup
ssh your-qnap-ip
cd /share/CACHEDDEV1_DATA/.qpkg/CrashPlan/conf
/etc/init.d/crashplan.sh stop
Modify the my.service.xml and change the <location> and <serviceHost> tag values to:
<location>0.0.0.0:4242</location>
<serviceHost>0.0.0.0</serviceHost>
Modify the /etc/init.d/crashplan.sh
  1. Comment out the line which modifies the <location> in the my.service.xml file. Look for the line starting /bin/sed -i "s/<location.* and put a '#' at the begining of the line
  2. Repeat the same to comment out the place it replaces the <serviceHost>

Modify the upgrade scripts Go to the CrashPlan/upgrade directory and find out the latest directory created by the upgrade script. E.g. Run 'ls -lart' and take the last directory and go into that directory Modify the upgrade.sh with the following:
  1. Remove the "-v" parameter from the RM command E.g. RM = "rm -f"
  2. Modify the INIT_SCRIPT value E.g. INIT_SCRIPT = /etc/init.d/crashplan.sh
  3. Modify the INSTALL_VARS value E.g. INSTALL_VARS = ../../crashplan.vars
Run the upgrade script
sh upgrade.sh
Repeat the same modification to the upgrade.sh for any other upgrades. Typically, the upgrades are packaged into jar files and they will be downloaded to the upgrade directory. When one upgrade is done, the system automatically starts the next one. But for this also I had to modify the upgrade script. So need to stop the crash plan and the upgrade script before modifying it.
/etc/init.d/crashplan.sh
ps -aef | grep -i upgrade
# And kill the upgrade process if any, modify the upgrade script and run it
sh upgrade.sh
Finally modify the conf/my.service.xml and /etc/init.d/crashplan.sh as described before, if the upgrade script has modified these files.

To configure the client, (on MacOS)
  1. Modify the /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties and add the serviceHost to the IP address of the Qnap NAS.
  2. Copy the values from /share/CACHEDEV1_DATA/.qpkg/CrashPlan/var/.ui_info from the Qnap server to the /Library/Application Support/CrashPlan/.ui_info file on the Mac client

2 comments:

  1. Thank you very much for this post. My upgrades were killing my backup. Could you explain how you went about debugging this issue?

    ReplyDelete
  2. Also, I can no longer connect to the QNAP service using my desktop client. Did you have to revert any of the changes?

    ReplyDelete

Blog Archive

Scroll To Top