replication of two crypted zfs pools by syncoid

Hello,
I am attempting to replicate two crypted zfs storage space between laptop1 and laptop2 by ssh in raw mode.

The following command successfully create the crypted target pool from laptop1 → laptop2

laptop1> syncoid --sendoptions=“-w” --compress=none --delete-target-snapshots --no-sync-snap --no-rollback tank/mail laptop2:tank/mail

However I am not allowed to do incremental replication.

If I run the command again I get the error:
cannot receive new filesystem stream: destination ‘tank/mail’ exists
must specify -F to overwrite it

Even when I tried

laptop1> syncoid --sendoptions=“-w” --compress=none --force-delete --no-sync-snap tank/mail laptop2:tank/mail

syncoid complains that target cannot receive new filesystem stream: destination has snapshots .

Is this a story of setting the privilege of the user:

sudo zfs allow -u $USER receive, snapshot tank/mail

Best, Olivier

Please add –debug to the command and post the output for a better chance of help


In the meantime I can tell you what works for me.

The source dataset is encrypted and subsequent replication works.
I have granted the user the necessary privileged for zfs operation instead of suing root for syncing.

syncoid source_dataset remote_hostname:rootdataset/subdataset/source_dataset --no-privilege-elevation -r --sendoptions=w

attention the destination dataset must not exist on remote (first replication)

zfs allow rootdataset/subdataset
---- Permissions on rootdataset/subdataset ----------------------
Local+Descendent permissions:
        user user compression,create,destroy,mount,mountpoint,receive,rollback,sync
zfs allow root_dataset
---- Permissions on root_dataset --------------------------------------------
Local+Descendent permissions:
        user user destroy,hold,mount,send,snapshot,sync```