In addition to my ZFS snapshots I decided to implement a secondary backup system. I decided to land on urbackup for ease of use and, more importantly, it was easier to set up.
Server Install
Assuming a Cent-based system:
cd /etc/yum.repos.d/ sudo wget http://download.opensuse.org/repositories/home:uroni/CentOS_7/home:uroni.repo sudo yum -y install urbackup-server sudo systemctl enable urbackup-server sudo systemctl start urbackup-server
Open up necessary ports for the server:
sudo firewall-cmd --add-port=55413-55415/tcp --permanent sudo systemctl reload firewalld
By default urbackup listens on port 55414 for connections. You can change this to port 80 and/or 443 for HTTPS by installing nginx and having it proxy the connections for you.
sudo yum -y install nginx sudo systemctl enable nginx sudo setsebool -P httpd_can_network_connect 1 #if you're using selinux
Copy the following into /etc/nginx/conf.d/urbackup.conf (make sure to change server_name to suit your needs)
server {
server_name backup;
location / {
proxy_pass http://localhost:55414/;
}
}
Then start nginx:
sudo systemctl start nginx
You should then be able to access the urbackup console by navigating to the IP / hostname of your backup server in a browser.
Client Install:
Urbackup can use a snapshot system known as dattobd. You should use it if you can in order to get more consistent backups, otherwise urbackup will simply copy files from the host which isn’t always desirable (databases, for example)
Install dattobd (optional):
sudo yum -y update
# reboot if your kernel ends up being updated
sudo yum -y localinstall https://cpkg.datto.com/datto-rpm/repoconfig/datto-el-rpm-release-$(rpm -E %rhel)-latest.noarch.rpm
sudo yum -y install dkms-dattobd dattobd-utils
Install urbackup client:
TF=`mktemp` && wget "https://hndl.urbackup.org/Client/2.1.15/UrBackup%20Client%20Linux%202.1.15.sh" -O $TF && sudo sh $TF; rm $TF
#Select dattobd when prompted if desired
Configure Firewall:
sudo firewall-cmd --add-port=35621-35623/tcp --permanent sudo systemctl reload firewalld
Once a client is installed, assuming they’re on the same network as the backup server, they will automatically add themselves and begin backing up. If they don’t show up it’s usually a firewall issue.
Restore
Restoration of individual files is easily done through the web console. If you have a windows system, restoring from an image backup is also easy.
Linux hosts
Recovery is trickier if you want to restore a Linux system. Install an empty system of same distribution. Give it the same hostname. Install the client as outlined above, then run:
sudo /usr/local/bin/urbackupclientctl restore-start -b last
Troubleshooting
If for some reason the client not showing up after removing it from the GUI: Uninstall & re-install client software
sudo /usr/local/sbin/uninstall_urbackupclient
TF=`mktemp` && wget "https://hndl.urbackup.org/Client/2.1.15/UrBackup%20Client%20Linux%202.1.15.sh" -O $TF && sudo sh $TF; rm $TF
Hi Nicolas,
Good tutorial,
I have problems installing the Urbackup client agent in CentOS 7, I install it anyway and the client can not connect to the server,
Could you help me?
I’d be really grateful
Best regards.
It’s difficult to help without more information. What error message are you getting? Try removing and re-installing. Double check your firewall rules.
Hi Nicolas,
Thanks for your tutorial, it’s really great. I have a problem about a PC with Fedora 26 OS. After install the client on the UrBackup server, I cannot start a full image backup for this client. I tried to uninstall and install the UB client, but no fix.
Could you please help me?
My understanding is that urbackup only supports image backups on Windows machines. Since your machine is Linux based it is only capable of file backups.
Thanks Nicholas finally i installed client in centos7 your given steps work well thank you so much