Note that backuptank/backup mounted itself onto /mnt/tank where tank is supposed to be…
I worked out that I can zfs receive -u to not mount the received dataset, and therefore can fix this after the backup completes, but is this supposed to happen and is there a better way to avoid?
Thank you for the idea! Syncoid doesn’t seem to mention encrypted datasets or raw mode? I don’t want the data re-encrypted (so I can use the same keys to open it as the original) or re-compressed (one of the encrypted datasets is large and manages 1.57x with zstd-6 and 1.0x with lz4…, whereas the rest of the datasets are best with lz4).
The issue still occurs with syncoid but syncoid helped me find it, and syncoid behaves slightly different in a way that is less dangerous.
zfs send -R implicitly sets -p – Include the dataset’s properties in the stream. This includes mountpoint. syncoid does its own method of --recursive that does not automatically include --preserve-properties, but I need --preserve-properties, and enabling it also sends the mountpoint. However, syncoid sends the mountpoint as /mnt/mnt/tank which at least does not conflict with /mnt/tank! That will be fine.
I wasn’t aware of syncoid previously – thank you!
For those interested in syncoid: it needs a perl module Capture::Tiny. I downloaded syncuid and Capture::Tiny .pm files from GitHub, and installed like this into /mnt/tank/local:
Also I found the order of command line options mattered. With —sendoptions=w somewhere in the middle it errored with source/destination dataset not found, but worked when put last.