Last active
December 26, 2015 14:29
-
-
Save ex-nerd/e5c40242897b1eeabe4f to your computer and use it in GitHub Desktop.
Synology Crashplan upgrade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix a failed Crashplan upgrade on a Synology NAS. | |
# This function should be run directly on the NAS, as root. | |
# | |
# Based on Chris Nelson's blog post from here: | |
# http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/ | |
function do_crashplan_upgrade() { | |
cp_target_dir="/var/packages/CrashPlan/target" | |
cp_upgrade_jar=`ls -t -1 "$cp_target_dir/upgrade/"*jar | head -n1` | |
cp_version=`basename "$cp_upgrade_jar" .jar` | |
if [[ -z $cp_version ]]; then | |
echo "Can't find crashplan upgrade jar file" | |
return | |
fi | |
unzip -o "$cp_upgrade_jar" "*.jar" -d "$cp_target_dir/lib/" | |
unzip -o "$cp_upgrade_jar" "lang/*" -d "$cp_target_dir/" | |
# This was required for old upgrades. Don't seem to need it anymore: | |
# unzip -o "$cp_upgrade_jar" run.conf -d "$cp_target_dir/bin/" | |
# This decommissions the most recent upgrade file so CP will regenerate it. | |
# upgrade_file=`ls -t -d "cp_target_dir/upgrade/$cp_version".*/upgrade.sh | head -n1` | |
# mv "$upgrade_file" "$upgrade_file".old | |
# ... or just decommission all of them | |
for upgrade_file in /var/packages/CrashPlan/target/upgrade/$cp_version.*/upgrade.sh; do | |
mv "$upgrade_file" "$upgrade_file".old | |
done | |
echo "Upgrade prep work completed for version $cp_version." | |
echo "Now, you should log into your Synology and restart the Crashplan package." | |
# now it's time to (re)start crashplan and make sure it upgraded | |
echo "Once you have confirmed the upgrade is successful, add the following" | |
echo "headless key to your .ui_info file:" | |
echo -n " " | |
cat /var/lib/crashplan/.ui_info ; echo | |
echo | |
echo "For more details, see the original instructions here:" | |
echo "http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very cool! Two suggestions for future versions: