Child pages
  • HOWTO install UrBackup on a QNAP NAS
Skip to end of metadata
Go to start of metadata

what i have:

--> QNAP  TS-121

 

what we need:

- putty     --> a terminal --> every time you see "#" you need putty

- winSCP  --> an "file-explorer" 

 

What we will do:

 

1. installing packages for compiling 

1a) optware IPKG

1b) installing necessary packages for compiling

1c) edit the Optware.sh

 

2. installing missing packages for urbackup

2a) creating temp and install directory

2b) installing missing packages for urbackup

2bb) crypto++

2bbb) libcurl & libcurl-dev

 

3. installing urbackup-server

3a) download the source-code and unzip

3b) we set the "install-dir" with prefix

3c) compiling (make)

3d) edit the MAKEFILE

3e) make install

3f) edit the "start_urbackup_server"

 

4. Testing

4a) starting urbackup-server

4b) test if it works

4c) config the "backup-dir"

 

5. Autostart urbackup-server at startup

5a) create an "autorun.sh"

5b) edit the "qpkg.conf"#

 

---------------------------------------------LET US BEGIN-------------------------------

 

1. installing packages for compiling 

 

1a) optware IPKG

 

-->  go to the app-center on your qnap and install the optware IPKG

--> APP CENTER --> ALL APPS --> optware IPKG

 

 

1b) installing necessary packages for compiling

 

--> for compiling the source code for urbackup we need some packages

     --> logon with putty on your nas and type the following:

 

# ipkg update

# ipkg install libidn getopt unzip optware-devel

 

1c) edit the Optware.sh

 

Fix the $PATH in “/etc/profile” (see here)

--> you can edit the Optware.sh with winSCP --> go to /etc/init.d/ and open the Optware.sh

Look for the section of code which mentions /opt/bin. Replace it so that this part of the file looks like:

 

save the file. 

reboot the QNAP NAS and check – in admin shell (putty) – the $PATH environment : variable “ /opt/bin” and “/opt/sbin” should come before “/bin” and “/usr/bin”. For instance: 

 

2. installing missing packages for urbackup

 

2a) creating temp and install directory

 

--> in the temp dir i will download the necessary source-code for compiling

--> Because my Qnap (121) has not enough space at "system-dir" i will use my "own" install dir for urbackup

--> the temp and install dir are now FIX!!! if you want anothe location for the temp and install dir you have  adapt every time where you find my temp and install dir @ your own 

 

temp dir:

with winSCP go to 

     /share/HDA_DATA/

create a temp dir 

 

install dir:

with winSCP got to 

     /share/HDA_DATA/

create urbackup dir 

in urbackup dir create an install dir and an backup dir

 

it shuld look like this:

   /share/HDA_DATA/

                              temp

                              urbackup

                                             install

                                             backups

 

 

2b) installing missing packages for urbackup

 

--> for compiling the source-code of urbackup successful we need some package 

--> the crypto++ package need do be compiled and installed

 

 

2bb) crypto++

 

with putty type the following:

# cd /share/HDA_DATA/temp

# mkdir cryptopp

# cd cryptopp

 

download the source-code for crypto++

# wget http://prdownloads.sourceforge.net/cryptopp/cryptopp562.zip

# unzip cryptopp562.zip

# rm -r cryptopp562.zip

# make -f GNUmakefile --> this will take a wile

# make libcryptopp.a libcryptopp.so

# make install

--> if there comes an error message, with cryptest.exe (not enough space) --> thats no problem

--> now you can delete the cryptopp folder in your temp

# rm -r /share/HDA_DATA/temp/cryptopp

 

2bbb) libcurl & libcurl-dev

 

# ipkg update

# ipkg install libcurl

# ipkg install libcurl-dev automake

REBOOT the system now

# reboot

 

 

3. installing urbackup-server

 

3a) download the source-code and unzip

 

--> with putty go to the temp dir

# cd /share/HDA_DATA/temp

 

download the source-code for urbackup

 

# wget http://sourceforge.net/projects/urbackup/files/Server/1.2.3/urbackup-server-1.2.3.tar.gz/download

# tar xzf urbackup-server-1.2.3.tar.gz

# rm urbackup-server-1.2.3.tar.gz

# cd urbackup-server-1.2.3.261/

 

3b) we set the "install-dir" with prefix

 

----------------------PREFIX----------------

--> we use the prefix to install urbackup on a place we want

--> because at my qnap is not enough space @ the "system directory"

--> this will install urbackup @ /share/HDA_DATA/urbackup/install/

--> the following command will check your qnap if all dependings are installed

 

# ./configure --prefix /share/HDA_DATA/urbackup/install/

 

--> when there was NO ERROR-MESSAGE then we can compile the source-code

 

3c) compiling (make)

--> this will take a very long time--> go for lunch or coffe

# make

 

3d) edit the MAKEFILE

 

--> we have to edit the make file, because the "adduser" command will not work

--> go with winSCP to

/share/HDA_DATA/temp/urbackup-server-1.2.3.261/

and edit the MAKEFILE

--> go to the buttom and search for the following line:

adduser urbackup --system --quiet --group --home "$(DESTDIR)$(localstatedir)/urbackup" || true

--> and comment it out with #, so that it look like this:

###adduser urbackup --system --quiet --group --home "$(DESTDIR)$(localstatedir)/urbackup" || true

 

 

 

3e) make install

 

--> now we can "install" urbackup  @ QNAP

--> All files shoud be installe @ /share/HDA_DATA/urbackup/install/

 

# make install

 

3f) edit the "start_urbackup_server"

 

--> go with winSCP to  

                               /share/HDA_DATA/urbackup/install/sbin/ 

 

--> edit the "start_urbackup_server" 

   
search for: 

      PREFIX=/usr

 

replace with:

 

   PREFIX=/share/HDA_DATA/urbackup/install

search for: 

 

      DAEMON_DIR="/var"

 

replace with:

 

   DAEMON_DIR="/share/HDA_DATA/urbackup/install/var"

 

SAVE FILE!!!!

 

 

 

4. Testing

 

4a) starting urbackup-server

 

with putty go to the install dir

# cd /share/HDA_DATA/urbackup/install/sbin

# ./start_urbackup_server

 

 

4b) test if it works

 

---> open your browser and type:

IP_of_Your_NAS:55414

 

--> now you should see the webAdminPagePage

 

 

4c) config the "backup-dir"

 

--> under Settung you should set the location where urbackup-server should save the "BACKUPS"

--> i set: /share/HDA_DATA/urbackup/backups/

 

5. Autostart urbackup-server at startup

 

5a) create an "autorun.sh"

--> REMEMBER to adapt these lines if you use another location of your "install path"

-->  I make some "variables" --> there you can place your "install path"

 

--> with winSCP go to:

                    /share/HDA_DATA/urbackup/install/sbin

--> create the file:

                    autorun.sh

--> enter the following line into the "autorun.sh" file

THE RED CODE should only be ONE!!!! LINE

 

############################################

 

 



5b) edit the "qpkg.conf"

 

--> with winSCP goto

     /etc/config/

--> edit the "qpkg.conf

--> the SHELL and the INSTALL_PATH are the important lines

--> at the end of the line enter these following lines!! REMEMBER to adapt these lines if you use anothe location of your "install path"

 

 

 

 

-->FINISH<---

  • No labels