Using an OMV5 Samba share to store backup?

I am trying to understand how to get my backups stored in a Samba share running on OMV5. I’ve read about a dozen posts here and looked at the FAQ which has a section that appears to address this but with my lack of experience I haven’t been able to translate that into steps I can take to get this done.

Here’s my setup:
I have OMV5 (5.5.19-1) running on an Pi 4
The Pi 4 is running Raspbian GNU/Linux 10 (buster)
Through the OMV Extras screen I installed Docker and Portainer
The Docker Version is 20.10.2 and Portainer is 2.0.0
I installed UrBackups 2.4.13 in a container using the docker instructions I found at https://www.urbackup.org/download.html#server_docker

Here’s what I’d like to Accomplish:
A logged into into UrBackup and noticed in the settings that the back directory is /media/backups which is located on my PI 4’s very small SSD. I would like to change that to a Samba share I have setup on my OMV server.

The share is on /dev/sdc1 “OMVServer02A”. The share name is “Backups”.
And, the full path is /srv/dev-disk-by-label-OMVServer02A/Backups
Changing the UrBackup directory to /Backups yields a “The directory where UrBackup will save backups is inaccessible.”

As I mentioned, I read through the FAQ and found some information there. I also found similar question in several forum posts but no answers that I fully understood how to implement. Based on what I’ve read so far I believe I need to identify the user UrBackup is running as and then give that user access rights to the Samba share running on OMV.

I’ve done something almost like this for my plex server which is running on another linux pc on the network. In that case I edited fstab on the plex machine so it logged into the share on the OMV machine over the LAN when it booted up. So, I thought it would be something similar here. But, being new to docker or Portainer when I tried to figure out how to do that to something running in a container I found myself staring at the screen with that look my sons dog gives me when he’s confused…

Any advice, direction, or references to articles written for total docker newbs would be greatly appreciated!!!

Thanks!
Tom G.

Hey Tom.

I had this happen. It had something to do with permissions and maybe user, and I had to do something at the command line to fix it. I wish I could remember the details better. But, I can pull info from my setup for you to compare.

The one thing I did check was user and permissions on directory where my backups are stored.

drwxr-sr-x+ 9 mark users 4096 Jan 16 15:45 backups

The subdirectories inside backups are like this:
drwxrws—+ 18 mark users 4096 Jan 8 02:02 ASUS-LAPTOP
drwxrws—+ 23 mark users 4096 Jan 9 03:28 DESKTOP-4TOIRSH
drwxrws—+ 2 mark users 4096 Jan 9 10:11 clients

If I remember correctly, mark is the user I created to run omv. But, I rarely use it. At the terminal, I normally use root. To open OMV web portal, I use admin.

I hope this helps a little.

1 Like

In my first attempt to get this to work I created a user in OMV5 called “urb_Admin” I gave that user full read/write to the OMV5 smb share volume I created “/Backups”. I then went to Portainer and added a user of the same name and then added a CIFS volumes that pointed to the /Backups share adding the user and password. All that seemed to work as best i could tell. But, when I went into UrBackup and set the backup destination to the share, it doesn’t recognize it so clearly I’m not understanding how to accomplish this.

After that fail I found the FAQ on this site and saw reference to identifying the user UrBackup is running as or under. How do I identify that? With that identified is it as simple as creating a matching user in OMV5 and then setting up that as the user for that CIFs volume?

I’m really guessing here, Tom. The Urbackup user is ‘inside’ the container. He’s using the bind between the path inside the container to the host path and he’s mapped to a host user by the PUID and PGID. On my setup, mark is PUID 1000 and PGID 100 on the host, and the container maps to these.

image

User mark isn’t a user in Portainer, btw.

In OMV, mark is set with users, sudo, and ssh group rights.
image

Then in the OMV Shared Folders interface, the ACL for the /backups folders is set to RW for user mark:
image

Personally, I have a little trouble understanding the difference between privileges and the ACL. I may have tried the one, failed, then tried the other…

Hopefully this helps and your son’s dog isn’t wondering why you are looking like him :wink: