I use syncoid --no-privilege-elevation and occasionally I see cannot mount '/mnt/backup-tank/my-dataset': failed to create mountpoint: Permission denied in the output.
The user on the target indeed doesn’t have ZFS mount permissions. I think it shouldn’t need them because the target is a backup server and if I need anything from the backup I would only then mount it manually or just zfs send it back to the production server. Or am I missing something?
If it’s fine to not allow ZFS mount, how can I prevent syncoid from attempting to mount the dataset on the target? I think what it does is it’s looking at the source properties and tries to replicate them on the target, which includes whether it’s mounted or not, but in normal operation I only want the dataset to be mounted on the source and I don’t need it to be mounted on the target.
Although you might think send on one end and receive on the other would be enough, full replication will require two more privileges on the receiving side: create and mount.
That’s a neat article, and it explains that the mount error can be avoided by setting mountpoint=none on the parent dataset on the target. But what if tha parent dataset doesn’t exist yet and is synced with syncoid -r parent-dataset ...?
Also how does this interact with --sendoptions=w? (send raw to keep an encrypted dataset encrypted during transfer and storage)
AFAIK, it’s not possible to mount the dataset without the encryption key, which is why I’m using raw-send in the first place, so that if the backup target got compromised, an attacker couldn’t read my backed up data.
--recvoptions=OPTIONS Use advanced options for zfs receive (the arguments are filtered as needed), e.g.
syncoid --recvoptions="ux recordsize o compression=lz4" sets zfs receive -u -x recordsize -o com‐
pression=lz4 ...
and from man zfs-recv:
--recvoptions=OPTIONS Use advanced options for zfs receive (the arguments are filtered as needed), e.g.
syncoid --recvoptions="ux recordsize o compression=lz4" sets zfs receive -u -x recordsize -o com‐
pression=lz4 ...