inherited property would be the same at the destination. This can occur
when replicating partial dataset trees without the parents that set the
property locally.
syncoid --preserve-properties preserves locally set properties but not inherited properties that would be not be inherited at the destination. Example:
tank local acltype=posix (default for TrueNAS pools)
tank/home local acltype=nfsv4
tank/home/evan inherits local acltype=nfsv4
tank/home/evan/Documents inherited acltype=nfsv4
backup local acltype=posix (default for TrueNAS pools)
syncoid --recursive --preserve-properties tank/home/evan backup/evan
replicates the datasets but with acltype inherited from backup = posix, and not acltype=nfsv4 as was inherited from tank/home.
The desired result in this case would be to set acltype=nfsv4 locally on backup/evan and inherit acltype on backup/evan/music. It would also need to preserve some settings that are intended to be different, for example setting copies=2 on backup, or excluding mountpoint.
This PR implements a new command line option --preserve-inherited-properties that preserves properties where they were inherited in their source location but would not otherwise be inherited in their destination.
Real output in my enviroment after running syncoid syncoid --recursive --preserve-inherited-properties --recvoptions="u o readonly=on x mountpoint" tank backup
> zfs get acltype,mountpoint,readonly -r backup -t fs
NAME PROPERTY VALUE SOURCE
backup acltype posix local
backup mountpoint /mnt/backup local
backup readonly off default
backup/tank acltype posix local
backup/tank mountpoint /mnt/backup/tank inherited from backup
backup/tank readonly on local
backup/tank/home acltype nfsv4 local
backup/tank/home mountpoint /mnt/backup/tank/home inherited from backup
backup/tank/home readonly on local
backup/tank/home/evan acltype nfsv4 inherited from backup/tank/home
backup/tank/home/evan mountpoint /mnt/backup/tank/home/evan inherited from backup
backup/tank/home/evan readonly on local
backup/tank/home/evan/Documents acltype nfsv4 inherited from backup/tank/home
backup/tank/home/evan/Documents mountpoint /mnt/backup/tank/home/evan/Documents inherited from backup
backup/tank/home/evan/Documents readonly on local
This change:
- adds --preserve-inherited-properties command line option with --help
- implicitly sets --preserve-properties if --preserve-inherited-properties is set
- renames getlocalzfsvalues to getzfspropertiestopreserve to reflect its purpose
- returns local and inherited properties if --preserve-inherited-properties is set, otherwise local properties only
- skips propeties that are set or excluded in recvoptions
- skips properties that would be inherited correctly at the destination unless they were locally set at the source
- adds keylocation to blacklist (along with other encryption-related properties)
If --insecure-direct-connection contained 4 parts (including the
',mbuffer' at the end), the 3rd part (timeout) was silently ignored
and left at the default 60s.
Do not ignore the timeout part even in directmbuffer mode.
add cd /tmp to Debian and Ubuntu package build instructions, to avoid newbies getting confused by limited permissions under eg /root
add reference to dependency on Capture::Tiny in sanoid and syncoid
The `runsynccmd` subroutine was not matching the `$sendsource` when a
receive resume token is passed in. All usages that pass in the receive
resume token do not begin with a space; instead, they start with `-t `.
Fixes: https://github.com/jimsalterjrs/sanoid/issues/918