dasti
Explorer
- Joined
- Jun 11, 2014
- Messages
- 71
last update 8 Oct 2015
last tested with URbackup 1.4.9 on FreeNAS-9.3-STABLE-201509282017
Initially I wrote this guide because the developer compiled a PBI for version 1.3.2, but it doesn't work for me at that time (check the original thread for more details). Actually it's not that true anymore the .pbi works you can stop the pluging via the jail section of the UI but in the pluging UI it keeps saying that the status is OFF...you can DL it from here.
What is URbackup ?
- It's an open source client/server backup solution made by URONI with interesting features :
- If you think is it a good software, please support Uroni's project.
What are we going to do ?
- create a jail and prepare it
- install urbackup
- configure the backup directory
step 0 - preparation
- your FreeNAS must have a fully working internet connection
- you must be able to access your freenas box through SSH
- you must prepare the ip address you'll allocate to the jail we're going to create together
- you must have a dataset that will be dedicated to the data storage (if not I'll explain this later) it will be named "backups"
- your pool is named "mypool"
- the jail "urbackup"
step 1 - Create a jail
If you're not familiar with the concept of jails please check the freenas 9.3 official documentation and the freebsd handbook.
With freenas' web interface, create a standard FreeBSD Jail x64 with the name Urbackup and the [ip address of your choice]
step 2 - connect to your FreeNAS box with ssh
from linux
- open a shell and type ssh [YourUserName]@[IpAddressOfYourFreenasBox]
from windows
- download and install your favorite ssh client software (example superputty)
- use your client to connect to your FreeNAS box
step 3 - enter your jail
(so you'll be able to enter commands directly from inside the jail)
check how many jails you have and note the number of the jail id (JID) of the Urbackup's jail
you'll get a list of the jail looking like this
now you have the JID (or jail's IDentification) you can enter the jail with a command of this format -> jexec [JID] tcsh
the prompt should look like something like this
note that it's possible to connect directly in ssh into the jail. (instruction to do that are in the official freenas documentation)
step 4 - install needed packages
step 5 - download and unpack urbackup
note :that this url can change (as I'm writing those words, it move from source forge to hndl
unpack urbackup
step 6 - install urbackup
Thoses steps can take a "certain amount of time"
step 7 - autostart URbackup at boot
build the initializing script, edit this file
There is a discussion bellow about were the startup file should be placed according to the freebsd standards /usr/local/etc/rc.d/urbackup_srv or /etc/rc.d/urbackup_srv ...It seems it should be the first one but it works for me in the 2nd one, if anyone has reading suggestions
Insert this text and save
add a line in the startup file
step 8 - create a dataset and mount it into the jail
It's a good practice to separate where you store your datas and where you store you application. In freenas' terms one dataset for the jail, one for the storage. The jail dataset was already created, we'll use another for the data and mount it into the jail.
Make sure that you have a dataset ready for those data. If not, go in Freenas webUI in storage / volumes / mypool / create dataset and create it ! Check the official documentation for more detailled informations.
To mount your data's dataset in the jail use Freenas' webUI, go in jails / deluge / storage / Add storage and input the correct source and destinations directories. Check the official documentation for more detailed informations
here's the example in our case
change permissions
step 9 - correct Urbackup's default configuration
Connect to URbackup's web interface with your favorite internet browser using an url of this format -> http://[IpaddressOfTheJail]:55414
Go in the settings / general / server tab
In the [backup storage path] field, the default value is "c:/backup", change it into "/mnt/backups"
Credits
The original post is here, so I'm not the author just the secretary :).
Thanks to cheeks, dabone, dimi, peterjs, protoSD and RAurelian the real authors !
last tested with URbackup 1.4.9 on FreeNAS-9.3-STABLE-201509282017
Initially I wrote this guide because the developer compiled a PBI for version 1.3.2, but it doesn't work for me at that time (check the original thread for more details). Actually it's not that true anymore the .pbi works you can stop the pluging via the jail section of the UI but in the pluging UI it keeps saying that the status is OFF...you can DL it from here.
What is URbackup ?
- It's an open source client/server backup solution made by URONI with interesting features :
- full and incremental image and file backups: Whole partitions can be saved as well as single directories.
- Image and file backups while the system is running
- centralized web interface administration that can control or not client's configuration
- Secure and efficient backups to your own server via Internet, if the client is currently not in your local network
- more details here -> http://www.urbackup.org/- Image and file backups while the system is running
- centralized web interface administration that can control or not client's configuration
- Secure and efficient backups to your own server via Internet, if the client is currently not in your local network
- If you think is it a good software, please support Uroni's project.
What are we going to do ?
- create a jail and prepare it
- install urbackup
- configure the backup directory
step 0 - preparation
- your FreeNAS must have a fully working internet connection
- you must be able to access your freenas box through SSH
- you must prepare the ip address you'll allocate to the jail we're going to create together
- you must have a dataset that will be dedicated to the data storage (if not I'll explain this later) it will be named "backups"
- your pool is named "mypool"
- the jail "urbackup"
step 1 - Create a jail
If you're not familiar with the concept of jails please check the freenas 9.3 official documentation and the freebsd handbook.
With freenas' web interface, create a standard FreeBSD Jail x64 with the name Urbackup and the [ip address of your choice]
autostart remained checked
VIMAGE - unchecked
NAT - unchecked
vanilla - checked
VIMAGE - unchecked
NAT - unchecked
vanilla - checked
step 2 - connect to your FreeNAS box with ssh
from linux
- open a shell and type ssh [YourUserName]@[IpAddressOfYourFreenasBox]
Code:
ssh root@192.168.4.10
from windows
- download and install your favorite ssh client software (example superputty)
- use your client to connect to your FreeNAS box
step 3 - enter your jail
(so you'll be able to enter commands directly from inside the jail)
check how many jails you have and note the number of the jail id (JID) of the Urbackup's jail
Code:
jls
you'll get a list of the jail looking like this
[root@freenas] ~# jls
JID IP Address Hostname Path
1 192.168.4.1 poney /mnt/testzfs/jails/poney
2 192.168.4.2 Urbackup /mnt/testzfs/jails/Urbackup
JID IP Address Hostname Path
1 192.168.4.1 poney /mnt/testzfs/jails/poney
2 192.168.4.2 Urbackup /mnt/testzfs/jails/Urbackup
now you have the JID (or jail's IDentification) you can enter the jail with a command of this format -> jexec [JID] tcsh
Code:
jexec 2 tcsh
the prompt should look like something like this
root@Urbackup:/ #
note that it's possible to connect directly in ssh into the jail. (instruction to do that are in the official freenas documentation)
step 4 - install needed packages
Code:
pkg update pkg upgrade pkg install nano pkg install wget pkg install cryptopp pkg install curl
step 5 - download and unpack urbackup
Code:
mkdir /urbackup cd /urbackup wget http://hndl.urbackup.org/Server/1.4.9/urbackup-server-1.4.9.tar.gz --no-check-certificate
note :that this url can change (as I'm writing those words, it move from source forge to hndl
unpack urbackup
Code:
cd /urbackup tar zxvf urbackup-server-1.4.9.tar.gz
step 6 - install urbackup
Thoses steps can take a "certain amount of time"
Code:
cd urbackup-server-1.4.9 ./configure make make install
step 7 - autostart URbackup at boot
build the initializing script, edit this file
Code:
nano -wc /etc/rc.d/urbackup_srv
There is a discussion bellow about were the startup file should be placed according to the freebsd standards /usr/local/etc/rc.d/urbackup_srv or /etc/rc.d/urbackup_srv ...It seems it should be the first one but it works for me in the 2nd one, if anyone has reading suggestions
Insert this text and save
Code:
#!/bin/sh . /etc/rc.subr name=urbackup_srv rcvar=urbackup_srv_enable command="/usr/local/sbin/${name}" command_args="--plugin /usr/local/lib/liburbackupserver_urlplugin.so --plugin /usr/local/lib/liburbackupserver_cryptoplugin.so --plugin /usr/local/lib/liburbackupserver_downloadplugin.so --plugin /usr/local/lib/liburbackupserver_fsimageplugin.so --plugin /usr/local/lib/liburbackupserver_httpserver.so --plugin /usr/local/lib/liburbackupserver.so --http_root /usr/local/var/urbackup/www --workingdir /usr/local/var --user urbackup --http_port 55414 --logfile /var/log/urbackup_srv.log --daemon" start_precmd="cd /usr/local/var" load_rc_config $name run_rc_command "$1"
Check if there's no line brake in the 6th line ( "command arg" ), pay attention when you copy/paste it
Give the execute permissions to the script
Code:
chmod +x /etc/rc.d/urbackup_srv
add a line in the startup file
Code:
echo 'urbackup_srv_enable="YES"' >> /etc/rc.conf
step 8 - create a dataset and mount it into the jail
It's a good practice to separate where you store your datas and where you store you application. In freenas' terms one dataset for the jail, one for the storage. The jail dataset was already created, we'll use another for the data and mount it into the jail.
Make sure that you have a dataset ready for those data. If not, go in Freenas webUI in storage / volumes / mypool / create dataset and create it ! Check the official documentation for more detailled informations.
To mount your data's dataset in the jail use Freenas' webUI, go in jails / deluge / storage / Add storage and input the correct source and destinations directories. Check the official documentation for more detailed informations
here's the example in our case
source : /mnt/mypool/backups
destination : /mnt/mypool/jails/urbackup/mnt/backups
create directory is : checked
mounted is : checked
destination : /mnt/mypool/jails/urbackup/mnt/backups
create directory is : checked
mounted is : checked
change permissions
Code:
chown -R urbackup:urbackup /mnt/backups
step 9 - correct Urbackup's default configuration
Connect to URbackup's web interface with your favorite internet browser using an url of this format -> http://[IpaddressOfTheJail]:55414
Go in the settings / general / server tab
In the [backup storage path] field, the default value is "c:/backup", change it into "/mnt/backups"
The original post is here, so I'm not the author just the secretary :).
Thanks to cheeks, dabone, dimi, peterjs, protoSD and RAurelian the real authors !
Last edited: