Correct way to script ZFS replication in TrueNAS Scale?

Ok I think I finally figured out why I was getting the user and group quota errors…

It was because my backed-up datasets were not mounted after a reboot :cry:
This is apparently because of the highly-recommended zfs-autobackup --clear-mountpoint which sets the zfs property canmount to noauto, causing the dataset not to be mounted at boot.

Because zfs-autobackup warns of the danger of not doing this, I blindly followed this advice. But as it actually breaks TrueNAS, I will now stop doing that and set canmount to on instead (as it is on the source).

After investigating why it could be dangerous to do this, this seems related to backing up datasets in various ‘levels’. For example, if you backup dataset-depth1 and also dataset-level1/dataset-level2/dataset-level3 you are in danger of unintentionally modifying dataset-level1/dataset-level2.

Since I will only be modifying 1 dataset level (level3 that is), I think this risk does not apply to me (but please do correct me if I’m wrong!)

edit:
I’ve just done another incremental backup and I’m again getting the same errors :cry:
Even though the datasets are still mounted and canmount is still set to on

A reboot does seem to solve it :confused: (probably only until the next backup)

1 Like