Pi, OMV, Docker, Portainer, urbackup - cannot access directory

On a Raspberry Pi 4 I’ve OMV 5 installled.
Attached to it are 2 external disks using USB.
Docker/Portainer installed and UrBackup is installed using this great and simple guide:
https://dannyda.com/2020/09/11/how-to-install-urbackup-on-openmediavault-5-omv5-with-docker-and-portainer-easily/
In short, Add stack, name it “urbackup”, add the below docker-compose and then deploy it.

  version: '2'

services:
  urbackup:
    image: uroni/urbackup-server:latest
    container_name: urbackup
    restart: unless-stopped
    environment:
      - PUID=1000 # Enter the UID of the user who should own the files here
      - PGID=100  # Enter the GID of the user who should own the files here
      - TZ=Europe/Stockholm # Enter your timezone
    volumes:
      - /srv/dev-disk-by-label-SunSol1/urbackup/database:/var/urbackup
      - /srv/dev-disk-by-label-SunSol1/urbackup/backup:/backups
      # Uncomment the next line if you want to bind-mount the www-folder
      #- /path/to/wwwfolder:/usr/share/urbackup
    network_mode: "host"
    # Activate the following two lines for BTRFS support
    #cap_add:
    #  - SYS_ADMIN  

After installing the UrBackup-client on my windows 10 machine, I noticed that the SDcard on the Pi was full. Apparently the volume-settings above did not work.
In UrBackup WebGUI, the backup path was /backup and after several trial and errors I’ve now ended up with:

/srv/dev-disk-by-label-SunSol1/Data1/Backup/urbackup/backup
…in the WEB GUI and also updated the volume setting in Portainer (and redeployed the container).

UrBackup cannot access this directory (error code 2) and I think might have to do with permissions.

I do not have any specific user for UrBackup. I’ve one OMV Webadminuser named “admin” and one “raspberry pi user” named “pi”. User “pi” has PUID 1000 & the group “pi” has PGID 100.
Since user “pi” can do anything in the system, including access the above path via ssh I’m guessing UrBackup is not using the user pi.
Could this be the case? If not, what could the issue be?

I finally got it to work. Not really sure what did solve the problem, but this is what I did:
As mentioned above I’ve two usb-disks, Data1 & Data2 and since I was guessing it had something to do with user rights I…

  1. Wiped, unmounted, formatted and then mounted the Data2-disk.
  2. Created a shared folder, “test_ubp” on that disk
  3. Quite sure I removed and added both the stack and the container at least one time.
  4. Changed the path using dev-disk-by-uuid-LotsOfLettersAndNumbers//test_ubp/backup

It could be that I changed from dev-disk-by-uuid to dev-disk-by-label. Read a post about OMV changed from label to UUID some time ago.

For reference, this is how the docker-compose looks:

version: ‘2’

services:
urbackup:
image: uroni/urbackup-server:latest
container_name: urbackup
restart: unless-stopped
environment:
- PUID=1000 # Enter the UID of the user who should own the files here
- PGID=100 # Enter the GID of the user who should own the files here
- TZ=Europe/Stockholm # Enter your timezone
volumes:
- /srv/dev-disk-by-uuid-bc1444c3-a015-4040-8148-ec2f0d7e01be/test_ubp/database:/var/urbackup
- /srv/dev-disk-by-uuid-bc1444c3-a015-4040-8148-ec2f0d7e01be/test_ubp/backup:/backups
# Uncomment the next line if you want to bind-mount the www-folder
#- /path/to/wwwfolder:/usr/share/urbackup
network_mode: “host”
# Activate the following two lines for BTRFS support
#cap_add:
# - SYS_ADMIN

…and the path in the server GUI apparently works just fine with “/backups”:

I’m so happy that it now works as expected. Thank you so much for developing this backup system!

Are you using drives with own power supply? If you supply the power to these drives by the RPi it will cause troubles. One drive might disconnect and you end up with the backup being placed on the OS instead of the data drive.

Thanks for the information :slight_smile:
Fortunately, the drives has their own power supply.