Closed luispabon closed 2 months ago
@luispabon yes you are doing something wrong :-) With the zfs send "-R" option you instructed zfs to do the recursive replication instead of syncoid. So all excludes which syncoid would handle have no effect:
-R, --replicate
Generate a replication stream package, which will replicate the specified file system, and all descendent file systems, up to the named snapshot. When received, all properties, snap‐
shots, descendent file systems, and clones are preserved.
If the -i or -I flags are used in conjunction with the -R flag, an incremental replication stream is generated. The current values of properties, and current snapshot and file system
names are set when the stream is received. If the -F flag is specified when this stream is received, snapshots and file systems that do not exist on the sending side are destroyed.
If the -R flag is used to send encrypted datasets, then -w must also be specified.
You can use they "-X" option for zfs send to exclude datasets in an -R stream:
-X, --exclude dataset[,dataset]…
With -R, -X specifies a set of datasets (and, hence, their descendants), to be excluded from the send stream. The root dataset may not be excluded. -X a -X b is equivalent to -X
a,b.
Thank you @phreaker0. How can I specify that as syncoid send options though? The following upsets syncoid:
~ syncoid --sendoptions="RwX zroot/vms/storage-pool-ephemeral" --no-sync-snap "zroot/vms" "vault:backups/luis-fw16/zroot/vms"
invalid send options! at /usr/sbin/syncoid line 38.
Usage:
[ ... ]
@luispabon seems there is missing support for X with argument, you can temporarily patch syncoid to support it right away:
https://github.com/jimsalterjrs/sanoid/blob/826d4d1c075e3310ec3c1d0297905d986e9470c2/syncoid#L2178
replace that line with "if ($char eq 'o' || $char eq 'x' || $char eq 'X') { "
Cheers. Looks like there's already a PR open for it:
I have the following set of datasets for libvirt VMs:
The
zroot/vms/storage-pool-ephemeral
is where I place VMs to try out and I don't want them to be snapshotted or backed up. So:syncoid:no-sync=true
When I try to send the
zroot/vms
to my remote backup server I get the following:Seems counter intuitive that the dataset is explicitly excluded from sync's on syncoid yet syncoid expects datasets to be there. Perhaps I'm doing something wrong?