Crashplan has an auto-update feature built into it’s software, which is a good thing except that Crashplan on a headless QNAP box will start failing when this happens. Â If the package maintainer would update the QNAP package when this happens this wouldn’t become a problem. Â But I’ve yet to see this ever happen.
Here’s the fix.
You will notice an upgrade directory in your root Crashplan directory, my default directory is /share/MD0_DATA/.qpkg/CrashPlan/upgrade.  If your directory is anything like mine, you will have a bunch of directories with #s on them…these are all the failed automatic upgrades the Crashplan attempted to perform and has failed.  I didn’t even noticed it was failing until my weekly email came out from Code42 and noticed my backups have been failing for about a week due to this.
First stop crashplan on your Qnap,
|
1 |
sudo /etc/init.d/crashplan stop |
Find the last failed attempt..
|
1 |
ls -lart |
cd into the last one listed.
|
1 |
cd 1388728800370.1422425158177/ |
In this directory you will find two jar files, c42_protolib.jar and com.backup42.desktop.jar .
|
1 |
pwd |
(make note of this directory as we will be needing this in a second..)
Now jump over to the main default CrashPlan lib directory, mine is in
/share/MD0_DATA/.qpkg/CrashPlan/lib/
Need to copy the two jar files listed above into this lib directory, but first make backups of these files..
|
1 2 3 4 5 |
cd /share/MD0_DATA/.qpkg/CrashPlan/lib/ sudo mv com.backup42.desktop.jar com.backup42.desktop.jar.old sudo mv c42_protolib.jar c42_protolib.jar.old sudo cp /share/MD0_DATA/.qpkg/CrashPlan/upgrade/1388728800370.1422425158177/c42_protolib.jar . sudo cp /share/MD0_DATA/.qpkg/CrashPlan/upgrade/1388728800370.1422425158177/com.backup42.desktop.jar . |
Once these are copied, now restart crashplan.
|
1 |
sudo /etc/init.d/crashplan start |
Now re-open your Crashplan client that runs over the SSH tunnel and viola.. you should be good to go.. Â It should be scanning for changed files to back up.
Once you have verfied this is working again, then remember to clean up the upgrade directory .. you can remove all those numbered directories.
Instructions for QNAP crashplan version 4.2.0
Comments below user StefanBC/DK mentioned how to fix for Windows.  Here’s the method for Linux..which is same fix just different file structure.
As mentioned below there is a new server/client auth key that is needed for the Crashplan client in order to authenticate against the QNAP crashplan server..without the key your client Crashplan client will just show it’s starting splash window forever without any errors. Â (hangs).
So grab the key from the QNAP server,
|
1 |
QNAP Host: /var/lib/crashplan/.ui_info |
Looks like this
|
1 |
4243,c89e5a44-4sks-2kds-da91-3257aec30249 |
Copy this key to your client crashplan install..into same file..
|
1 |
Client Host: Â /var/lib/crashplan/.ui_info |
If that line already exists on your client, you can safely remove that or back it up prior to copying the key over.
Edit
|
1 |
/share/MD0_DATA/.qpkg/CrashPlan/conf/ui_username.properties |
Where username = whatever user your currently logged in as..
Make sure these two lines are uncommented out..
|
1 2 |
serviceHost=<IP of QNAP host> servicePort=4243 |
Then run Crashplan from client
|
1 |
/path/to/crashplan/bin/CrashPlanDesktop |
Hopefully this helps and if you run into problems, check out the logs
|
1 |
/path/to/crashplan/log/ |
——————————————————————————————————————————
Here’s also another way…and probably the best way.
http://forum.qnap.com/viewtopic.php?f=227&t=39078&sid=6d7e5b342581ec624e888c92a3b829f1
Hello,
here same kind of issue.
3.7.0.34 want to update, but can not complete.
Your procedure did work in the past, but not with this update.
Any solution for this version?
Thx
Pingback: Warmfuzzyland » Archives » Fixing CrashPlan failing auto-updates for a headless QNAP installation
Great post! Saved my day 🙂
Just whish QNAP would incorporate this update feature into the package instead of us having to fudge around in the filesystem.
Thanks a million phatdee c”,)
I found another way…
Looking in the upgrade.log file, I found that the upgrade script was failing because the BusyBox Linux distro doesn’t know what the -v switch is for the mv and rm commands. By editing the ‘upgrade.sh’ script in the numbered upgrade folder that you reference above and removing the -v option for those commands, I could run the ‘upgrade.sh’ script manually successfully. I did have to restart the CP service after the script was complete, however.
In the ‘upgrade.sh’ script you will find the following lines near the top…
# commands, NOTE that the options are different based on OS/shell
RM=”rm -fv”
MV=”mv -fv”
Change these as follows…
# commands, NOTE that the options are different based on OS/shell
RM=”rm -f”
MV=”mv -f”
Just got around to upgrading this crashplan Qnap package, and looks like your right on with that mod to upgrade.sh script. After removing -v it installed fine.
Thanks Jerry nice catch.. For such a simple fix, you would think QNAP would have fixed their package by now..but looks like end users are still providing their QA for them..
Have just verified the solution proposed by Jerry Attrick and I can confirm that it worked for me too…
I had to “chmod +x upgrade.sh” after to be able to run the script… could be my fault I’m not a Linux guy :/
Thanks both of you!
Sincerely Stefan c”,)
The upgrade to v4.3 cause a lot more trouble than the normal replace of the arguments in the upgrade.sh file:
RM=â€rm -fâ€
MV=â€mv -fâ€
This upgrade also included a key that the client need to present to the server to connect to it and they also moved the ui.properties file to a new location, making the old one invalid 🙁
1. The Key
Copy the authentication key from your QNAP in this location:
/share/MD0_DATA/.qpkg/CrashPlan/var/.ui_info
it’s the long part after “4243,”
We have to modify (on Windows) the following file:
C:\ProgramData\CrashPlan\.ui_info
it has the contents like this:
—–File Start—–
4243,ab1c23de-a12b-1a2b-1ab2-a123b4c5678d
—–File End—–
with the key from the QNAP.
2. New location of ui.properties
They have the ui.properties to a new location and possibly making individual property files per user that uses the CrashPlan client.
The new files are here:
C:\ProgramData\CrashPlan\conf\ui_(YOUR_USERNAME_ON_WINDOWS).properties
Fx my username on this box is “test” so the file name is:
C:\ProgramData\CrashPlan\conf\ui_test.properties
just add the line:
ServiceHost=192.168.1.55
or whatever your QNAP’s IP is 😉
Start the client and you’re good to go!
Took me some time and reading a bunch of log files and articles on the net to find and understand this change! Hope this helps a lot of people out there
Thanks StefanBC/DK, haven’t had a chance to upgrade to this version yet, but thanks a million for the write-up!!
Just wanted to give a thumbs up. This fixed my persistent upgrade issue.
Thanks again.
Running CrashPlan in a Docker container should avoid these issues. (QTS 4.2 or higher)
https://blog.pedropombeiro.com/run-crashplan-in-a-docker-container-on-a-qnap-ts-x53-pro/
as a small weekend joke … on my TS453mini,
CrashPlan also started the update, but failed
as a result, objects in lib will disappear, no data in ../upgrade, nothing …
just unable to run …
re-install from App Center works,
but only for minutes,
as the auto-update comes back again
cat history.log.0
I 05/05/17 10:41PM CrashPlan started, version 4.5.0, GUID …
I 05/05/17 10:43PM CrashPlan started, version 4.5.0, GUID …
…
I 05/05/17 10:44PM Download of upgrade complete – version 1436674800482.
I 05/05/17 10:44PM CrashPlan has downloaded an update and will restart momentarily to apply the update.
I 05/05/17 10:45PM Installing upgrade – version 1436674800482
I 05/05/17 10:45PM Upgrade installed – version 1436674800482
I 05/05/17 10:45PM CrashPlan stopped, version 4.5.0, GUID …
After that, lib empty …
wonderful update 😀
hope I will see some progress for that in qnap forum / support
as it makes CrashPlan unusable …
wish all of you a great weekend
final update from CrashPlan Support:
“There is not an option to disable auto-update.
This can cause problems in a headless setup, which is one of the reasons we do not support it.”
bad, but will see if it will work after update to 4.3.x
greetings
finished; CrashPlan version 4.8.2 on TS-453mini with 16GB RAM
works also after update to QTS 4.3.x,
using manual qpkg installation as described here:
https://forum.qnap.com/viewtopic.php?f=227&t=39078&sid=703fe9a5784945fc83613db99f8a51aa#p171682
so, have fun …