Hi everyone, I’ve been using Urbackup for over 10 years and want to give something back to the community. I noticed the Urbackup Downloads page is missing instructions on how to install Urbackup server on a Truenas Scale server. Maybe we can add these instructions to the website?
I’m running TrueNas Scale Cobia 23.10.0.1
In Truenas Scale, go to Datasets and add 2 Datasets for urbackup. I created URBACKUP_BACKUP and URBACKUP_DATABASE
Go to Apps and click on Discover Apps
Click Custom App
Application Name = urbackup
Under Container Images, Image repository = uroni/urbackup-server and Image Tag = latest
Under Container Environment Variables, add a Container Environment Variable Name = TZ and Environment Variable Value = America/New_York to set your timezone to EST
Under Networking, add an external interface, select your Host Interface, IPAM type = static, and add a static ip. In my example, i used 192.168.88.8/24 as my static ip. You can add multiple interfaces here if you need UrBackup server to access clients on multiple VLAN’s.
Under Storage, add a Host Path Volume with a mount path of /backups. That will use the host path of the first dataset we created in step 1. In my case, that is URBACKUP_BACKUP
Add a second Host Path Volume with a mount path of /var/backups. That will use the host path of the second dataset we create in step 1. In my case, that is URBACKUP_DATABASE
Click Install and wait a few minutes for the installation to complete.
Thank you, this was helpful! The only problem i have now is to run the container as a specific user ID/group ID, have you tried to change that from default?
So if you do it this way, then try and browse the backups remotely, it fails because it can’t find the symlinks.
I worked around the issues y doing htis in the host:
mount --bind /mnt/tank/urbackup_backup /backups
#!/bin/bash
CONFIG="follow symlinks = yes\nwide links = yes\nunix extensions = no\nallow insecure wide links = yes"
SMB_CONF="/etc/smb4.conf"
# Check if the configurations are already present in smb4.conf
grep -q -F "symlinks" "$SMB_CONF"
if [ $? -eq 0 ]; then
echo "Configurations are already present in $SMB_CONF. No changes made."
else
# Append the configurations and restart the Samba service
echo -e "\n$CONFIG" | sudo tee -a "$SMB_CONF"
sudo systemctl restart smbd
echo "Configurations added to $SMB_CONF. Samba service restarted."
fi
Still need to figure out:
2024-03-31 17:08:48.595764-04:00TEST FAILED: guestmount is missing (libguestfs-tools)
2024-03-31 17:08:48.598784-04:002024-03-31 17:08:48: Image mounting disabled: TEST FAILED: guestmount is missing (libguestfs-tools)
@A_Jolly this sounds like a problem specific to your setup. My instructions result in a server that you can backup, restore, and browse the backups remotely.
I’ve got that working, but does yours support
1)mounting and browsing the files on an image backup,
2) ZFS deduplication
3) Browsing backed up files over a network share, not just the web interface?
1)mounting and browsing the files on an image backup,
I never use urbackup in this way.
2) ZFS deduplication
No deduplication.
3) Browsing backed up files over a network share, not just the web interface?
I use the web interface to browse backup files.
Ah yeah, all those should work, just need to figure out how to configure it right to do so. At least I got #3 working. I like having network mounts so I can do things like diff my current file to a previous version.
Could you please expand how you achieved #3?
I mean, i could create a SMB share to point to the folder wherre UrBackup is saving the backups but, without proper restrictions all users will have access to the backups of every other user in the system.
no?
I guess you are right. But i think i would need an ACL for each urbackup client.
This is fine if you have a small number of clients but it becomes difficult to manage if you have more than, lets say, 10 clients.
There has to be an easier way, unless I’m overthinking things again.