August 31, 2012

Set up CrashPlan on QNAP NAS using QPKG, the easy way

Introduction to CrashPlan

Description

Here's how Wikipedia describes CrashPlan backup software:

CrashPlan is backup software that allows Windows, Mac, Linux and Solaris users to back up their data to an offsite data center, computers belonging to friends and family, as well as to attached drives / shared folders. There is a free version (for non-datacenter backups) and CrashPlan+ which is for backing up to CrashPlan's servers. Both versions allow users to back up data automatically.

How it can be used on your NAS

If you are the owner of a NAS from QNAP, you can install CrashPlan and use it to backup the contents of your NAS to the CrashPlan data center, to other computers and/or external harddisks. You can also allow incoming backups, so that you and your friends and family can back up valuable documents and files to your NAS.

Installation instructions

I will not go into any more detail about what CrashPlan is. It's time to get it installed and set up on a QNAP NAS. This installation method does not require SSH tunneling.


Install JRE QPKG

Log in to the web administration interface of your NAS and navigate to Application Servers > QPKG Center > Available tab > install Java Runtime Environment (version 6 or 7).

Make sure it has been installed and is enabled on the Installed tab.









Download CrashPlan QPKG

Go to this forum thread at QNAP forums (requires registration) and download CrashPlan for your NAS model. At the time of writing, CrashPlan is available for x86 models, x09 ARM and x10/x12/x19 ARM models.

Install and enable the CrashPlan QPKG

In the QPKG Center, where you enabled JRE in a previous step, click on the Get more tab and browse to the unzipped QPKG you just downloaded. Press install to install CrashPlan and be sure to enable it after installation.



Install CrashPlan on your client machine

In order to manage and configure CrashPlan on the QNAP NAS you need a client to be installed on your computer. It will be used to configure what should be backed up and when, among other things.
  • If you don't have CrashPlan installed, download it from www.crashplan.com and install it. 
  • If you are a CrashPlan user and have it installed on your local computer, you're all set.

Configure CrashPlan on the NAS

  1. Start/enable the CrashPlan QPKG, open its web interface at http://ip_of_your_nas/crashplan (ensure that Apache is running on your NAS: Applications -> Web Server) and select the interface on which the service will listen. This is not required if you only use one network interface. Please note that you will have to restart the service by yourself for the change to take effect.


  2. On the web interface, there is an ID mentioned. Edit the .ui_info file on your local machine using Notepad (as administrator) and replace the ID with the one from your NAS.

    .ui_info file locations:
    • Windows: C:\ProgramData\CrashPlan\.ui_info
    • Mac: /Library/Application Support/CrashPlan/.ui_info
    • Linux: /var/lib/crashplan/.ui_info
  3. Open the ui.properties file on your local client machine in Notepad. Uncomment the serviceHost line, by removing the bracket (#) at the start of the line, and change 127.0.0.1 to the IP address of your NAS (for instance 192.168.1.30).

  4. Open CrashPlan. The GUI will show CrashPlan on the QNAP NAS instead of the configuration on your local computer. Configure what to backup, where, when etc.

    When you're done configuring CrashPlan on the NAS, you can change the ui.properties file back to the way it was (#serviceHost=127.0.0.1). The next time you open up the CrashPlan GUI, you will see  the configuration of your local computer again, instead of the NAS config.


Remote backup instructions

Dynek, who maintains the CrashPlan QPKG, wrote this regarding incoming backups to your QNAP NAS.

Did you plan on letting friends and family backup data onto your NAS? Then you will need to read the following:
If you don't do anything, then data coming from outside will end up inside the QPKG's backupArchives directory. I suggest you create a share called CrashPlan. Then restart the CrashPlan service which will see the share and use it as backup destination for remote hosts (that way you can see amount of data used by family/friends).
Note: good point about creating the CrashPlan share is you can backup these data to an external drive using the QNAP backup tool.

If you are behind a firewall and want to allow people to backup to your NAS then you will most likely have to forward port 4242 TCP on your router.

Links

43 comments:

  1. Anonymous3/11/14 20:02

    Hello, thanks for your article!
    I have a problem, can you help me? I have QNAP-TS 420 and I installed the Crashplan application. After that, my NAS froze three times. When I call the URL It open the login screen normally but do not permit the login. Just dont respond. I disabled the crashplan application for three days and until now It is normal. Did you ever passed for this kind of problem. Do you have some suggestion that what can be this freezing problem?
    Thanks a lot!Thanks a lot!

    ReplyDelete
    Replies
    1. Sorry, I have not experienced that problem

      Delete
    2. Hello!

      I also faced with this but find solution!

      Just full reinstall Crashplan desktop app on your Mac or PC
      Seems like minor versions differences

      After that desktop app should connect to your QNAP TS-420 via NAS IP address

      I also have the same one model

      Hope that will work for you

      Delete
  2. I have everything installed fine, CrashPlan starts fine and the GUI connects to NAS fine. However, when I go to select files, under \share it only shows the root folder. I can only select root folder, but that does no good - all the files and subfolders are not accessible. Is there some permission setting? I have given "everyone" permission on the NAS. Even the default "Public" that is supposed to be open to everyone logging onto NAS is not accessible.

    ReplyDelete
  3. QNAP is using a "managed filesystem". Inside the folder /share/CACHEDEV1_DATA/
    you will most likely find all your files.

    ReplyDelete
    Replies
    1. Thanks Markus! This helped me. The "Shared" folder was like 200 TB for some reason on mine. Switching to the CACHEDEV1 folder fixed it. You rock!

      Delete
  4. Anonymous2/1/15 05:17

    Hello - I followed your instructions. I changed to the NAS IP address in ui.properties, but when I got to step 4 "Open Crashplan" - Crashplan client says "unable to connect to the backup engine, retry?" Could it be that the need for a password to access my NAS is causing an issue?

    Thank you

    ReplyDelete
    Replies
    1. Anonymous30/1/15 01:06

      I am also getting unable to connect. Did you ever get this working?

      Delete
    2. Hello!

      I also faced with this but find solution!

      Just full reinstall Crashplan desktop app on your Mac or PC
      Seems like minor versions differences

      After that desktop app should connect to your QNAP TS-420 via NAS IP address

      I also have the same one model

      Hope that will work for you

      Delete
  5. Anonymous1/2/15 05:09

    The default port is 4242 , I could never get it to connect until I changed the port to 4243 under the ui.properties. As soon as that was done it connected

    ReplyDelete
  6. Anonymous3/2/15 22:57

    I really should have been more descriptive. The way I figured out that Crashplan was running on 4243 was when you click on "open" crashplan on the management page of your qnap, you end up at a page where you can change the listening IP address of crashplan and allocate RAM for the process. If you notice, you can click Download configuration and log files. Inside that file is the ui.properties file which indicated what port it is running on.

    ReplyDelete
  7. Anonymous22/4/15 23:20

    What is the procedure to "Configure CrashPlan on the NAS" if working from a Mac instead of a Windows Laptop?

    ReplyDelete
    Replies
    1. The configuration instructions have been updated.

      Edit this file on Mac: /Library/Application Support/CrashPlan/.ui_info

      Delete
  8. Patrik, Thank You for posting this "How To" article. Nicely Done and just what I needed to get CrashPlan running on two QNAP TS-439U. Thank You

    ReplyDelete
  9. Got it all working, except the file size ins't showing properly

    All the folders are 1 file and 1K

    Any tips?

    ReplyDelete
  10. I don't know what is going wrong I change the ui.properties file but it always opens on the local machine never the server, its like it doesnt even try. I am not sure what to do

    ReplyDelete
  11. I have tried this, I am not sure what is going wrong but it is like it doesnt see the changes to the ui.properties, it always connects to the local machine, nothing I do makes a difference. I have tried editing the .ui file and uninstalling, nothing works. Any ideas?

    ReplyDelete
    Replies
    1. I GOT IT!!!
      you need to go to your QNAP CrashPlan page (http://ip_of_your_nas/crashplan) (http://192.168.x.x:8081/crashplan)
      copy the ID String (ID: 4243,a1a1a11a-1a1a-1a11-aaa1-11a11111111a,192.168.x.x)
      open notepad as administrator (so you can save)
      open the file C:\ProgramData\CrashPlan\.ui_info
      replace the info in that file with your ID string from your QNAP.
      Save!!
      open the file C:\Program Files\CrashPlan\conf\ui.properties
      uncomment and enter the IP address of your QNAP for (serviceHost=192.168.x.x)
      uncomment the line (servicePort=4243)
      Save.
      ensure that the service "CrashPlanService" is stopped and set to manual.
      open the CrashPlan client.
      TaDa!!!!

      Delete
    2. You are correct! This did help. I had to do one more step. I had to edit the .ui_info and change its properties to read only and take away edit rights to all but admin. It was being overwritten upon starting the program. All is working now! Thanks again!

      Delete
    3. Thanks guys, I have updated the configuration instructions with some of this info.

      Delete
    4. Thanks Stewart, I'll double check that on my PC!!

      Delete
  12. I'm in the same spot. No mater what it just opens to the local PC. if i disable the local PC service then It says "unable to connect to the backup engine, retry?"

    ReplyDelete
    Replies
    1. Hey check the response from SB02 and then my reply with both combined you should be good.

      Delete
  13. Anonymous24/1/16 08:10

    This support should help. seems from ver 3.2 onwards they have also introduced some token you need to get from the qnap /var/lib/crashplan and put in .ui_info https://support.code42.com/CrashPlan/4/Configuring/Using_CrashPlan_On_A_Headless_Computer

    ReplyDelete
    Replies
    1. you can get this from the QNAP crashplan webpage instead of cralling through an SSH session to find it. In my example here the ID: string is what you are after. the '4243' is the port it is on, the 'a1a1a11a-1a1a-1a11-aaa1-11a11111111a' is the token you are referring to, and th '192.168.x.x is the IP address your QNAP is listening on'
      I did crawl through the SSH session/download the log files/look at the crashplan page, and verified that this token was the same in all three places. it makes it super simple to get.
      (http://ip_of_your_nas/crashplan) (http://192.168.x.x:8081/crashplan)
      copy the ID String (ID: 4243,a1a1a11a-1a1a-1a11-aaa1-11a11111111a,192.168.x.x)

      Delete
  14. Charles K18/2/16 09:22

    Hello Everyone,

    I am facing a weird issue regarding this setup. I have followed the instructions and since i am a tech guy everything worked fine. I am able to connect to my qnap from my laptops crashplan UI, able to see the NAS local files, choose what i want to since etc etc.
    The thing is that no matter what i select as backup data the server is stuck at waiting for backup status.
    Also there seems to be no calculation of the data selected for backup and i and in the TO DO list i get a frustrating KB.
    Logs on the server show that settings are correct. I have stopped and restarted the CP service on the server and also reinstalled the client side with no results.
    Any ideas?

    ReplyDelete
    Replies
    1. Charles K18/2/16 09:43

      Correction: Shows TO DO 0 Files 0MB

      Delete
    2. I'm having the exact same issue...

      Delete
  15. first off forgive me, i'm down with the flu, I have fixed this (workaround like) but if it doesn't make sense, reply bellow and i'll try again.
    I ran into this, it was from the software auto updating. one of the updates broke the QNAP app.
    I have successfully stalled mine at Version: 4.4.0
    and this has corrected the issue.
    every hour I show three log entries.
    'Downloading a new version of crashplan'
    'Download of upgrade failed'
    'unable to apply upgrade(s), retrying in one hour'

    To me this coupled with the QNAP backing up to the cloud again is a success.
    so step one, was uninstall both the QNAP app, and the JRE (ARM in my case).
    reinstall the APP & JRE.
    immediately STOP/TurnOff the app and JRE.
    SSH to the QNAP
    edit (use vi) /share/MD0_DATA/.qpkg/Crashplan/conf/my.services.xml
    find this line: [upgradePath] upgrade [/upgradePath]
    change it to: [upgradePath] /dev/null [upgradePath]
    start the JRE & the APP, you will begin receiving hourly errors about failed updates, but then CraspPlan works and does it's backup.
    [Just a note i'm not that smart, I found the solution posted by "Thomas Weissinger" over at blog.thingsgeeky.co.uk/?page_id=5661 to solve an auto updating problem and applied it to this situation.]
    I am hopeful there will be a rewrite released from dynek to fix the issue, or maybe (like Thomas says) Code42 will write a headless version.

    hope this helps

    ReplyDelete
  16. Thanks SB02 and Stewart for posting - seems I have it working now.

    Until now I've been using crashplan on windows to backup mapped drives on my nas, but now I've upgraded my nas I'd really like to have crashplan run from the nas.

    Does anyone know if I can adopt my existing backup so I don't have to sync / upload 1.5TB of data from scratch ?

    From the support docs I've read from crashplan this doesn't look doable, has anyone else tried ?

    ReplyDelete
  17. I have a mac and have tried the above directions and still not seeing the Nas on the mac crashplan ap? Help

    ReplyDelete
  18. Even after changing (serviceHost and servicePort) in ui.properties along with .ui_info from Qnap Nas to "C:\Program Files\CrashPlan\.ui_info", internal address still appears as 0.0.0.0:

    Btw, i'm using crash plan 4.6 version in my pc. There was not "C:\Program Files\CrashPlan\.ui_info" originally and i copied this file from my NAS. are there any special settings for 4.6? this is a fresh install.

    Appreciate your help!

    ReplyDelete
  19. Anonymous22/4/16 04:12

    The post by SB02 is a crucial step in getting CrashPlan to work reliably on the QNAP and needs to be added to the original post. Without this step, your QNAP's CrashPlan will automatically upgrade and break before you finish your first backup. I didn't have to do anything with JRE like SB02 posted, all I did was change the upgradepath to /dev/null and restart the CrashPlan service, and it worked (and is still working).

    Steps to take:

    1. Install software on client and QNAP according to original post
    2. SSH to QNAP and change my.services.xml according to SB02's post
    (if it already updated and crashed, just navigate to the CrashPlan qpkg directory and issue commands "./crashplan.sh stop" and "./crashplan.sh start" after making this change to get it back up)
    (you can see if it updated by checking /log/history.log.0)
    3. Change UI file to use local CrashPlan app to manage QNAP CrashPlan config

    I created a batch file to facilitate the switch between managing CrashPlan on the QNAP and my local PC.
    Now I just do Win-R "qnapcp" to manage my QNAP's CrashPlan without having to edit ui files, and it switches back to the PC automatically afterward.

    (The reason for the 'echo | set /p' is to avoid the trailing newline when just using plain echo)

    qnapcp.bat:

    @ECHO OFF
    echo | set /p dummyName="YOUR-QNAP-CRASHPLAN-ID-STRING-GOES-HERE">C:\ProgramData\CrashPlan\.ui_info
    taskkill /f /im CrashPlanDesktop.exe > NUL 2>&1
    echo,
    echo,
    echo,
    echo,
    echo Launching QNAP CrashPlan...
    start "" "C:\Program Files (x86)\CrashPlan\CrashPlanDesktop.exe"
    echo,
    echo,
    echo,
    echo,
    echo Ready to reset CrashPlan UI to localhost?
    echo,
    echo,
    pause
    echo | set /p dummyName="YOUR-PC-CRASHPLAN-ID-STRING-GOES-HERE">C:\ProgramData\CrashPlan\.ui_info
    taskkill /f /im CrashPlanDesktop.exe > NUL 2>&1

    ReplyDelete
  20. I've followed these instructions (including someone's comment to disable the Windows Crashplan service) but when I try to open the Crashplan client, it immediately closes. The ui_error.log says: Exception in thread "main" java.lang.RuntimeException: Unexpected IO Exception constructing selector engine - e=java.io.IOException: Unable to establish loopback connection

    ReplyDelete
  21. faster way,
    SSH to qnap & run the following two commands
    vi /share/MD0_DATA/.qpkg/CrashPlan/conf

    sed -i 's/ upgrade<\/upgradePath>/\/dev\/null<\/upgradePath>/g' my.service.xml

    this is sed (stream editor) which is a text editor allowing for find and replace.

    ReplyDelete
  22. Hi I'm working with a Mac and when I open the ui.properties file (on my mac is shows as ui_.properties) I don't see a servicehost line or an IP address to change. All I see is this:

    #Sun Jun 19 00:11:39 CEST 2016
    MessageDisplayed.UpgradeReminder=1466283850109
    window=240,49,800,610

    Am I missing something?

    Also, if it isn't apparent yet. I am a total beginner with all things NAS and networking. I just happened to already be using crashplan when I decided to get a NAS and would like to keep using it if I can figure this out! Thanks for your help.

    ReplyDelete
  23. Hi I'm working with a Mac and when I open the ui.properties file (on my mac is shows as ui_.properties) I don't see a servicehost line or an IP address to change. All I see is this:

    #Sun Jun 19 00:11:39 CEST 2016
    MessageDisplayed.UpgradeReminder=1466283850109
    window=240,49,800,610

    Am I missing something?

    Also, if it isn't apparent yet. I am a total beginner with all things NAS and networking. I just happened to already be using crashplan when I decided to get a NAS and would like to keep using it if I can figure this out! Thanks for your help.

    ReplyDelete
    Replies
    1. If it's missing, I think you just need to add it yourself (not 100% if not just remove your changes after).

      For example I added the servicePort and serviceHost lines myself because they were missing:

      #Sun Jul 03 11:23:17 EDT 2016
      expandedDestinations=1\:42
      MessageDisplayed.UpgradeReminder=1465530250602
      servicePort=4243
      window=233,50,800,610
      serviceHost=192.168.1.16

      (I don't remember putting the port up there, but it seems to work right now)
      Replace the port and Host numbers with yours

      Delete
  24. i cannot find the ui_info on my mac anywhere

    ReplyDelete
    Replies
    1. The file is in there, simply, It's hidden by Mac.

      You'll need to use Nano in Terminal with Admin privileges to see it and save it:
      sudo nano /Library/Application\ Support/CrashPlan/.ui_info

      Change the path according to who Crashplan was installed for: All users, like the path above OR individual users.

      Delete
    2. I had the same issue UNTIl I realised that it is a hidden file. I used a program called EasyFind to locate the file. I deleted it. Then I created my own .ui_info file (no extension. The "." tells Mac OS that it is a system file and marks it hidden.) saving it to the same directory as the one I deleted. Done!

      Delete
    3. Ah glad you figured it out. I couldn't use good ol' TextEdit to save because it's admin locked so I used Terminal instead.

      And I was just about to come here asking for help, but FINALLY got Crashplan to connect. Yesterday, it wasn't connecting after finishing the .ui edits. but I think the issue was elsewhere, or how I was exiting and closing Crashplan on my local.

      I also noticed, my ID string had a different set of 4 numbers at the beginning:
      4257,abcde...,192.168...

      That's the port number, right? Weird to me because all of yesterday it was 4243 or something. ¯\_(ツ)_/¯

      Now time to see if this backup runs ok. If so, Crashplan has a new customer.

      Delete
  25. I don't own a MAC, but let me ask around work.

    ReplyDelete