Urbackup docker zfs error opening hashfile (code 2)

My urbackup instance is giving me the following error when creating an incremental image backup
Error opening hashfile (/backups/Laptop/250407-0424_Image_C/Image_C_250407-0424.raw.hash). No such file or directory (code: 2)

In the past I have used the command urbackup remove-unknown followed by a full image backup and that can get it going. However the error comes back if i ever restart the container.

Have any of you seen this error before?Any recomendations?

Urbackup is installed in truenas scale using the following docker compose:

---
services:
  urbackup:
    image: uroni/urbackup-server:latest-zfs
    container_name: urbackup
    privileged: true    # Required to manipulate ZFS snapshots
    networks:
      docker-LAN:
        ipv4_address: 10.0.0.19
    environment:
      - PUID=0 # UID of the user urbackup in Truenas who will own the files
      - PGID=0  # GID of the group urbackup in Truenas who should own the files
      - TZ=US/Eastern # Enter your timezone
      - HOST_OS=TrueNAS
      - HOST_HOSTNAME=urbackup
    volumes:
      - /mnt/lightning/apps/urbackup/database:/var/urbackup
      - /mnt/lightning/apps/urbackup/settings:/etc/urbackup
      - /mnt/thunder/urbackup/backup:/backups
    devices:
      - /dev/zfs:/dev/zfs
    restart: unless-stopped

networks:
  docker-LAN:
    external: true

I also enabled ZFS using the instructions on the instruction manual UrBackup - Server administration manual and i have confirmed that it is working by using the command urbackup_snapshot_helper test

The Image backup file format is set to “Raw copy-on-write file”
image

and the transfer mode have also set to “raw”.

I’m not sure but It seems that the process urbackupsrv needs to run as “root” in order to properly manipulate the ZFS system of the host. By default it runs as the user “urbackup”.

On normal systems the user for this process can be changed by editing the file /etc/default/urbackupsrv and changing the variable USER located at the bottom of that file.

How can this file be changed when urbackup is installed in a docker configuration? I tried to modify this file manually but the changed are not persistent.

Please help. This is affecting 2 of my systems.

Any ideas? suggestions? complaints? comments? anything?

There were similar issues about a year ago that seemed to affect docker users. I don’t think it was ever really addressed, but people found various solutions like changing file system permissions, or changing some backup threading settings.

The only thing that helped me was downgrading the server from 2.5.33 to 2.5.31.

@nwhdg, thanks for the suggestion on using the previous version of UrBackup but i believe there is no docker image available for it that also supports zfs.

I think you are on the right track in the sense that this seems to be affecting docker users. The available image have multiple things that could be improved such as:

  1. Missing the “libguestfs-tools” (that allows mounting images).
  2. Not exposing the variable “USER” from the file /etc/default/urbackupsrv as an enviromental variable so that it could be modified via docker compose.

I am trying my best to find solutions to these in order to make suggestions but i’m reaching the limits of what i know.