Hello,
my problem is not directly related to TrueNAS, but on ZFS.
I am using ElectricEel-24.10.2.1.
I am using Borg to backup some snapshots and to make things easier I want to backup my snapshots from .zfs/snapshot, instead of mounting the snapshots explicitely.
I am calling Borg with the argument “–files-cache mtime,size” to address changing inodes when using .zfs/snapshot. However, even with this argument Borg fails with “file type or inode changed while we backed it up (race condition, skipped file)”.
root@truenas# borg create --dry-run --show-rc --compression lz4 --exclude-caches --files-cache=mtime,size --progress ssh://myuser@myuser.server.de:22/./borgbackups/truenas::test /mnt/tank_01/ds_test/.zfs/snapshot/borgbackup
/mnt/tank_01/ds_test/.zfs/snapshot/borgbackup: file type or inode changed while we backed it up (race condition, skipped file)
terminating with warning status, rc 1
root@truenas# borg create --dry-run --show-rc --compression lz4 --exclude-caches --files-cache=mtime,size --progress ssh://myuser@myuser.server.de:22/./borgbackups/truenas::test /mnt/tank_01/ds_test/.zfs/snapshot/borgbackup
terminating with success status, rc 0
As you can see, the first access to the snapshot fails. But if I directly try it again, it works. So it seems, that the .zfs folder needs some “preparation time” until it is available.
I think I have a similar effect when accessing the .zfs folder from Windows (via smbshare). If I go into a .zfs/snapshot folder to see the content, Windows shows the folder as empty. However, when I refresh after 1-2 seconds, all content is shown correctly.
Is there a way to have the .zfs/snapshot data “immediately” available?
Is there any possibility to get Borg working withg .zfs/snapshot correctly?
Thanks a lot in advance,
Thomas