TrueNAS Scale ZFS Issues

Hello, I am at my wits end trying to get this working on TrueNAS Scale. I had Urbackup installed in the compose plugin and it wasn’t working properly. So I figured I’d run it as a “Launch docker image” but I get the same issues.

Datasets:

  • data/Backups/urbackup
  • data/Backups/urbackup/backups
  • data/Backups/urbackup/files
  • data/Backups/urbackup/images

Volumes:

  • /mnt/ssd/appdata/urbackup/database:/var/urbackup
  • /mnt/ssd/appdata/urbackup/backupfolder:/etc/urbackup/backupfolder
  • /mnt/ssd/appdata/urbackup/dataset:/etc/urbackup/dataset
  • /mnt/ssd/appdata/urbackup/dataset_file:/etc/urbackup/dataset_file
  • /mnt/ssd/appdata/urbackup/server_update_location.url:/var/urbackup/server_update_location.url
  • /mnt/data/Backups/urbackup:/mnt/data/Backups/urbackup

Running container as 0:0
PUID: 0
PGID: 0

backupfolder: /mnt/data/Backups/urbackup/backups
dataset: data/Backups/urbackup/images
dataset_file: data/Backups/urbackup/files

Settings > Backup storage path: /mnt/data/Backups/urbackup/backups

I have paid for CBT.

The issue is, urbackup creates the ZFS dataset data/Backups/urbackup/files/DC-2022. This is readable in truenas gui and exists on the file system.

It then creates data/Backups/urbackup/files/DC-2022/231012-0753. But this says
Path /mnt/data/Backups/urbackup/files/DC-2022/231012-0753 not found.

If I shell into the container, the files are there and the symlinks from backups > files work.
If I shell into the host, the files are not there.
If I restart the container, the files that were once there, are no longer there.

This is some of the log that I can see problem areas

2023-10-12 11:51:34.751517+00:00Testing for zfs...
2023-10-12 11:51:35.107444+00:00Destroyed subvol data/Backups/urbackup/images/testA54hj5luZtlorr494 successfully.
2023-10-12 11:51:35.107471+00:00ZFS TEST OK
2023-10-12 11:51:35.586693+00:00Destroyed subvol data/Backups/urbackup/files/testA54hj5luZtlorr494 successfully.
2023-10-12 11:51:35.587038+00:002023-10-12 07:51:35: Backup destination does handle subvolumes and snapshots. Snapshots enabled for image and file backups.
2023-10-12 11:51:35.587068+00:002023-10-12 07:51:35: Emulating reflinks via copying
2023-10-12 11:51:35.587253+00:002023-10-12 07:51:35: Reflink ioctl failed. errno=95
2023-10-12 11:53:21.980408+00:002023-10-12 07:53:21: New Backupclient: DC-2022
2023-10-12 11:53:22.563365+00:002023-10-12 07:53:22: Starting scheduled incremental file backup...
2023-10-12 11:53:22.563455+00:002023-10-12 07:53:22: WARNING: Cannot retrieve last file backup when doing incremental backup. Doing full backup now...
2023-10-12 11:53:22.568754+00:00Checking data/Backups/urbackup/files/DC-2022/231012-0753 for dependencies...
2023-10-12 11:53:22.571179+00:00cannot open 'data/Backups/urbackup/files/DC-2022/231012-0753@ro': dataset does not exist
2023-10-12 11:53:22.571463+00:002023-10-12 07:53:22: ERROR: No permission to access "/mnt/data/Backups/urbackup/backups/DC-2022/231012-0753"
2023-10-12 11:53:22.958013+00:002023-10-12 07:53:22: Starting scheduled full file backup...
2023-10-12 11:53:29.062201+00:002023-10-12 07:53:29: Change block tracking active on volume C:
2023-10-12 11:53:29.062230+00:002023-10-12 07:53:29: Indexing of "Desktop" done. 3 filesystem lookups 0 db lookups and 0 db updates

i have the same issue. i managed to get urbackup working with zfs on my truenas scale. with duduplication. but the issues i have with the datasets is the same like yours. i restart the container and the files are gone. the datasets in truenas are there, but with no user management. and when i try to access them on true nas, i get an error, that the path dont exist.

you find a solution to this?

Nope, I completely ditched urbackup altogether after not getting a response.

what you use now? i like urbackup, because its fast. i tried duplicati, but restores are too slow over vpn.

https://urbackup.atlassian.net/browse/US-125

i think this old issue is the problem. there was a commit in february to solve this.

the docker is 6 month old. i think i build a docker with the latest build and see if its working.

For VMs I use Unitrends (we already pay for it). Everything else I use Duplicacy.

what i did, is to compile urbackupserver with the new urbackup_snapshot_helper on a test vm. i took the compiled urbackup_snapshot_helper and put it on my truenas. than i mounted the file directly as app storage to the urbackup container.

the new urbackup_snapshot_helper is working this way. unfortunatly it don’t resolve the problem. the datasets created by urbackup are still faulty. and after the container restart, the backup files are gone from urbackup. in the truenas gui, one can see the urbackup datasets, with error [ENOENT] Path /xxx/xxx/xxx not found, so they are not visible from the cli.

Yeah, I’m doing this at work. I can’t mess around with stuff that may or may not work. Unfortunately I could’ve saved a lot of money with urbackup. But… it is what it is.

maybe the zfsutils, what are in the container, need an update. i don’t know. and right now i am not in the mood to teach myself, how to make a deb from source, to build a new container for docker. i tried a little bit the last days, but i failed.

i guess i have to wait for a new release. and how i know urbackup, this can be tomorrow, or in one year …

Yep. That was another bullet point in abandoning lol.

i just created a docker with debian bookworm and the latest zfsutils. still the same problem.

i found out something strange. if i mount the files dataset with the mountpoint 1:1 inside the container, it works for 1 child dataset, which is the dataset for the client. its created correctly, with the settings inherited. but than the child of this dataset, which are the actual backups - JJMMDD-HHMM, behave the same again and don’t show up mounted on the host, with no quotas and acl.
i stop the container and make a host path 1:1 from the client dataset. than the backup dataset is created properly, but the files inside the dataset cannot be accessed.
so, everything what is 2 level bellow the parent dataset, is broken. i don’t know if this is a problem with zfs itself, or just a mess with urbackup docker.

Btw, the docker images should be updated, but I think you want docker pull uroni/urbackup-server:latest-zfs

I do have urbackup mostly working under scale following this guide -Install UrBackup Server on Truenas Scale - #9 by A_Jolly