Running Crashplan in a Ubuntu VM

Backup, Restore, Netbak Replicator, Cloud Storage Services
depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Running Crashplan in a Ubuntu VM

Post by depen » Fri Dec 18, 2015 1:25 am

Hi guys,

I´ve been using Crashplan home for a couple of years. Installing it directly on my home NAS has been the most efficient way for me, but unfortunately Crashplan doesn´t support it. During my time using crashplan, I´ve had multiple of software issues. This has made it more and more frustrating not having any support, on my most important service. I´m a complete linux knewbi, but I write this little guide to help other persons in my situation. I´ve spent many days trying different approaches to get everything running. Hopefully this will help you save some time. I will probably not be able to answer any questions, but I promise that I will try.

Requirements:
-QNAP Virtualization Station
-2GB ram, but I recommend 4GB.

PROS
-Connect to UI via remote desktop, no need to struggle with .ui_info etc.
-Standard Crashplan Install => Official support and there by future proof.
-Support 64bit Java => access all of your RAM (Crashplan recommends 1GB RAM per 1TB Storage).
-Should be unaffected by QNAP QTS updates.

CONS
-Consumes more resources then running via QPKG package.
-It requires more time to setup than installing a QPKG.

Howto make a supported Crashplan installation on QTS v4.2:
1) Create a VM, set proper keyboard layout and set Video to VMVGA in Virtualisation Station. I use 3GB ram and 2 cores on my TS-251, equiped with 8GB ram.

2) Download and Install Ubuntu 14.04.3 server 64bit, minimum packages. Choose to auto install security updates.
http://www.ubuntu.com/download/server

3) Always boot to terminal.
https://www.youtube.com/watch?v=HpyvDF_ ... e=youtu.be

4) Set auto-update reboot "True"(using the "unattended-upgrades" package):
https://help.ubuntu.com/community/Autom ... ityUpdates

5) Configure ufw firewall (only open port 4242/tcp) using this guide:
https://www.digitalocean.com/community/ ... 04-servers

Code: Select all

sudo ufw allow 4242/tcp 
sudo ufw show added
sudo ufw enable


6) Optional: clone the clean VM-image for future use.

7) Install GUI, LXDE works best fore me :-P http://www.htpcbeginner.com/install-gui ... -04-gnome/

Code: Select all

sudo apt-get update 
sudo apt-get upgrade
sudo apt-get install xorg lxde-core lxrandr


8 ) I also installed a virtual keybord, text editor, ntp, nethogs, cifs and libwebkitgtk-1.0 (used by Crashplan CLI).

Code: Select all

sudo apt-get install onboard leafpad ntp nethogs cifs-utils libwebkitgtk-1.0-0


9) startx and set proper screen resolution:

Code: Select all

xrandr -q 
sudo xrandr -s 1280x720

(Works with tight VNC; Fullscreen Exit: "ctrl + alt + shift + F")

10) Download crashplan

Code: Select all

wget https://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_4.5.0_Linux.tgz


11) Optional: If you want crashplan to run on the latest JRE, install jre-headless. Personally, I want crashplan to use the JRE that is bundled with the installation package.

Code: Select all

sudo apt-get install openjdk-7-jre-headless


12) install Crashplan and when the script asks,change runlevel to /etc/rc2.d

Code: Select all

tar xzvf CrashPlan_4.5.0_Linux.tgz 
cd crashplan-install
sudo ./install.sh


13) The Ubuntu VM will access your NAS drives via a network share. Set up network share in QTS and permanently mount them with cifs-utils using this guide: https://help.ubuntu.com/community/Mount ... ermanently

I don´t know if it´s needed, but I also added "file_mode=0777,dir_mode=0777,noperm" as attributes. My fstab line looks like this:

Code: Select all

//192.168.x.x/crashplan_backups /path/to/mnt cifs iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,credentials=/home/user/.smbcredentials,uid=1000 0 0


14) Give the VM a static IP and portforward port 4242 in your router.

15) Open the CrashPlan app and log in. Double-click the CrashPlan logo in the upper-right corner. The CLI-window will open. This windows might be blank, see known issue below. Enter the following command, using a value appropriate for the size of your backup selection (example: 2560 for a 2.5TB selection):

Code: Select all

java mx 2560, restart


16) Start enjoying Crashplan!!!

Known issues:
-The crashplan installer gives an error message when it tries to move the "electron-x64" folder. According to Crashplan support, electron is not required for v4 so error should be ignored. :D

-Crashplan UI terminal/console is completely blank, no text is shown. You are able to run commands, so it´s no big deal only a bit irritating.
The Crashplan CLI requires libwebkitgtk-1.0-0 to work.
:D

-Attaching backup archive manually doesn´t work. My guess it is due to linux file permissions...

-Migrating from Crashplan_QPKG: Adopt Computer will not work on incomming backups. Your friends might need to start there backups from scratch. :(
Last edited by depen on Wed Jul 27, 2016 3:23 am, edited 6 times in total.
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

TommySharp
Getting the hang of things
Posts: 86
Joined: Mon Feb 09, 2015 11:49 am

Re: Running Crashplan in a VM

Post by TommySharp » Sun Dec 20, 2015 9:20 am

I thought I'd try install crashplan on a VM running Windows 7 but the issue was that crashplan can't backup shred folders or even mapped drives. I guess you are using linux to get round this issue somehow?
Tommy
Auckland, New Zealand

TS-653 Pro, 8GB RAM with a single 1TB drive (just while I test it out)
Running 4.2.0 10th Sept version

depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Re: Running Crashplan in a Ubuntu VM

Post by depen » Sun Dec 20, 2015 4:24 pm

Crashplan can backup shared network folders. You are experiencing a Windows user limitation. When you install Crashplan on windows you get to choose between installing for "Any User" or installing "per User". Any User will install Crasplan on the Windows System user. When you log in on Windows and mount a network share, you do it as a Local User. The System user (Crashplan) can´t see network shares mounted by local users. Crashplan describes this here:
https://support.code42.com/CrashPlan/4/ ... work_Drive

There are a couple of possible solutions for you. But if you only have one local user on your VM and make it auto-login, you could uninstall crashplan and reinstall it "per User".

If you need more help, start a new thread and we will continue there :-)
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

TommySharp
Getting the hang of things
Posts: 86
Joined: Mon Feb 09, 2015 11:49 am

Re: Running Crashplan in a Ubuntu VM

Post by TommySharp » Mon Dec 21, 2015 1:00 pm

Thanks Depen! I did manage to get it working now in the windows VM. It seems a little slow to backup to another computer with crashplan which is on the same network but at least it works.....
Tommy
Auckland, New Zealand

TS-653 Pro, 8GB RAM with a single 1TB drive (just while I test it out)
Running 4.2.0 10th Sept version

User avatar
tariqnisarahmed
Starting out
Posts: 23
Joined: Mon Dec 21, 2015 2:14 pm

Re: Running Crashplan in a Ubuntu VM

Post by tariqnisarahmed » Tue Dec 22, 2015 7:52 am

depen wrote:Crashplan can backup shared network folders. You are experiencing a Windows user limitation. When you install Crashplan on windows you get to choose between installing for "Any User" or installing "per User". Any User will install Crasplan on the Windows System user. When you log in on Windows and mount a network share, you do it as a Local User. The System user (Crashplan) can´t see network shares mounted by local users. Crashplan describes this here:
https://support.code42.com/CrashPlan/4/ ... work_Drive

There are a couple of possible solutions for you. But if you only have one local user on your VM and make it auto-login, you could uninstall crashplan and reinstall it "per User".

If you need more help, start a new thread and we will continue there :-)


Forgive me if this is a stupid question, but does this mean that if (1) I install CrashPlan to a single user on my Win 7 laptop that (2) I could permanently mount a Network folder located on my QNAP, and thus (3) be able to choose that network folder within CrashPlan? That's what I attempted to do as soon as I first got CrashPlan. But I had no luck whatsoever getting CrashPlan to see the Network folder.

Maybe I followed the wrong steps? Or is this scenario one that will work only if I create a virtual machine? On the QNAP? So that my Win 7 machine can save to the VM's hard drive space...?

TommySharp
Getting the hang of things
Posts: 86
Joined: Mon Feb 09, 2015 11:49 am

Re: Running Crashplan in a Ubuntu VM

Post by TommySharp » Tue Dec 22, 2015 11:09 am

Yes you can do that....There is a writeup on the crahsplan website on how to backup shared folders.... I just followed that and am now happily backing up my photos and home movies from my QNAP to my brothers PC on the other side of the country...
Tommy
Auckland, New Zealand

TS-653 Pro, 8GB RAM with a single 1TB drive (just while I test it out)
Running 4.2.0 10th Sept version

depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Re: Running Crashplan in a Ubuntu VM

Post by depen » Sun Jan 03, 2016 4:43 pm

Updated main post with input from Crashplan ticket.
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Re: Running Crashplan in a Ubuntu VM

Post by depen » Fri Jan 22, 2016 5:10 am

Update from crashplan ticket:
I have been made aware that in some cases, the window with text is it will not load, as this is an HTML page. If we are unable to load the page, for whatever reason, we will display a blank page, but this will allow input to still occur.
Below is the page with the available commands:

http://support.code42.com/CrashPlan/4/T ... n_Commands
This (old) issue, has been marked with low priority, since it is not preventing usage from occurring.

Please let me know if you have any questions or concerns.

MikeW
Customer Champion
Code42 Support


Maybe I need some mozilla packages..? I will test tomorrow and report back =).
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Re: Running Crashplan in a Ubuntu VM

Post by depen » Sat Jan 23, 2016 2:16 am

When I read the support answere again I realise that my ticket might be ended since it´s a "known bug".

However, I guess that it´s commons-cli-1.2.jar generating this issue. Installing the required libcommons-lang-java did not do the trick... But my install is using the crashplan built-in java, so I guess it shouldn´t matter. Does anyone know if it´s possible to retrieve a fault code of any kind from commons-cli-1.2.jar?
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

d3763
Starting out
Posts: 11
Joined: Sat Aug 08, 2015 6:08 am

Re: Running Crashplan in a Ubuntu VM

Post by d3763 » Mon Feb 01, 2016 3:42 am

I am following your guide but when I get to:

Code: Select all

xrandr -q

It tells me that it "can't open display".

How do you avoid/fix this?

depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Re: Running Crashplan in a Ubuntu VM

Post by depen » Mon Feb 01, 2016 4:17 am

It should show you compatible screen resolutions. Try to run it from shell inside xorg (= startx and then xrandr -q).
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

d3763
Starting out
Posts: 11
Joined: Sat Aug 08, 2015 6:08 am

Re: Running Crashplan in a Ubuntu VM

Post by d3763 » Tue Feb 02, 2016 5:38 am

depen wrote:It should show you compatible screen resolutions. Try to run it from shell inside xorg (= startx and then xrandr -q).


You were right, I never did startx. That seems to have solved it. Thanks!

jcazes
New here
Posts: 3
Joined: Sun Feb 14, 2016 5:31 am

Re: Running Crashplan in a Ubuntu VM

Post by jcazes » Mon Mar 07, 2016 3:18 pm

depen wrote:13) The Ubuntu VM will access your NAS drives via a network share. Set up network share in QTS and permanently mount them with cifs-utils using this guide: https://help.ubuntu.com/community/Mount ... ermanently

I don´t know if it´s needed, but I also added "file_mode=0777,dir_mode=0777,noperm" as attributes. My fstab line looks like this:

Code: Select all

//192.168.x.x/crashplan_backups /path/to/mnt cifs iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,credentials=/home/user/.smbcredentials,uid=1000 0 0


14) Give the VM a static IP and portforward port 4242 in your router.

15) Open the CrashPlan app and log in. Double-click the CrashPlan logo in the upper-right corner. The CLI-window will open. This windows might be blank, see known issue below. Enter the following command, using a value appropriate for the size of your backup selection (example: 2560 for a 2.5TB selection):

Code: Select all

java mx 2560, restart


16) Start enjoying Crashplan!!!



Hi Depen -- thank you for the guide! I seem to get stuck on #13.

1. Should the .smbcredentials files have username and password credentials for my NAS or the Ubuntu user account?
2. My fstab line looks like this:

Code: Select all

//192.168.1.200/user1 /backups cifs iocharset=utf8,credentials=/home/user2/.smbcredentials,uid=1000,gid=1000 0 0

(where user1 is the user account for my NAS and user2 is the user account in Ubuntu. Does that sound correct?
3. When I try to mount from the root/backups folder, I get this error:

Code: Select all

mount.error(6): No such device or address


Any advice?

depen
Know my way around
Posts: 101
Joined: Thu Oct 15, 2015 11:50 pm
Location: Sweden

Re: Running Crashplan in a Ubuntu VM

Post by depen » Tue Mar 08, 2016 3:02 am

jcazes wrote:where user1 is the user account for my NAS and user2 is the user account in Ubuntu. Does that sound correct?

Yes, but I think you might have used the wrong network address. According to your fstab you have a QTS network folder named "user1". I guess your network folder is something else, and the credentials (username/password) to access it should be user1/password. I have attached some screenshots from my QTS configuration. Comparing them with my fstab line might be helpfull.

fstab line
//192.168.x.x/crashplan_backups /path/to/mnt cifs iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,credentials=/home/user/.smbcredentials,uid=1000 0 0

QTS network share
Contains username/password to access QTS network folder
Local Ubuntu folder that will be used by crashplan to access QTS network share


//Depen
You do not have the required permissions to view the files attached to this post.
QNAP TS-251 with 2pcs Western Digital Red WD30EFRX 64MB 3TB in RAID1

jcazes
New here
Posts: 3
Joined: Sun Feb 14, 2016 5:31 am

Re: Running Crashplan in a Ubuntu VM

Post by jcazes » Tue Mar 08, 2016 9:47 am

aha!!! Thank you so much for clarifying. It wasn't clear from that guide you linked what should go after the IP address, but I now see it's just the folder name from my NAS. I made some adjustments and officially have a few mapped network folders now.

Crashplan for ubuntu is running, so thank you so much for this!

Post Reply

Return to “Backup & Restore”