UrBackup with ZFS on Ubuntu Focal 20.04 Problem and Solution

I was able to get UrBackup (from the Xenial PPA) and ZFS working on Ubuntu Focal 20.04 with a little difficulty.

The problem: UrBackup doesn’t detect ZFS volumes.

urbackup_snapshot_helper test

Testing for zfs…
TEST FAILED: Creating test zfs volume “xxx/images/testA54hj5luZtlorr494” failed

The reason for the problem:

find_zfs_cmd() in the urbackup_snapshot_helper binary calls zfs --version and expects a return code of 2 (the --version switch is not supported in Xenial ZFS 0.6.5). zfs --version IS supported in Focal 0.8.3 and has a return code of 0. find_zfs_cmd() fails on return code of 0.

Hacked-together solution until this is addressed in UrBackup:

Step 1: mv /sbin/zfs /sbin/zfs-original
Step 2: Create a new bash script named /sbin/zfs with identical ownership/permissions and the following contents


zfs-original "$@"

if [[ "$@" == "--version" ]]
  exit 2

exit $original_return_code
1 Like

Nice work-around. Need to fix this pull-request https://github.com/uroni/urbackup_backend/pull/19/commits/ecc76cc5f7a870c5b68bdfc1eca036a2fdc6adf9?diff=unified&w=1 such that it works with the old+new version…

Focal package should be available via OpenSUSE Build service soon https://www.urbackup.org/download.html#server_redhat

@dimoochka : Thanks for your fix !

@uroni : We have the same problem since we upgrade from Debian 9 to Debian 10 with zfs backports (0.8.4-1~bpo10+1) . Are there plans to release a fixed version soon (2.4 branch) ?


@TomTomGo Be careful with copy/paste of the script - I noticed that the quotes don’t translate correctly (get changed to right/left double quotes). It should also be --version (two dashes originally that got converted to a single long dash).

Also when you upgrade the zfs package, the zfs script gets overwritten by a new binary. My backups suddenly started failing when this happened and I had to redo the process to get it working again.

@TomTomGo this issue is fixed in 2.4.13 which was just pushed to the repo. Thanks @uroni !

@dimoochka Thanks for this info and all the previous !
And as usual, thanks @uroni for this New release and this nice software :sunglasses:

Have a nice day