ZFS zfs send recursive snapshot - exclude dataset

jbo@

Developer
I've been reading the man page of zfs-send(8) (amongst others) in the hopes of coming up with a solution of sending recursive snapshots to a remote host while excluding a particular/specific child dataset. Unfortunately, I could not find a way of doing so.

Is there a way of sending a recursive snapshot but excluding a particular dataset?
My scenario: I'm backing up a ZFS pool to a remote machine but one particular dataset (which is a child of the "root dataset" to back up) does not need to be backed up (poudriere pkg repo).
 
Hmm... sounds promising.
It doesn't happen often that I have to read a man page section more than twice but:

This feature can be used to allow clones of a filesystem to be made available on a remote system, in the case where their parent need not (or needs to not) be usable. For example, if a filesystem contains sensitive data, and it has clones where that sensitive data has been secured or replaced with dummy data, redacted sends can be used to replicate the secured data without replicating the original sensitive data, while still sharing all possible blocks. A snapshot that has been redacted with respect to a set of snapshots will contain all blocks referenced by at least one snapshot in the set, but will contain none of the blocks referenced by none of the snapshots in the set. In other words, if all snapshots in the set have modified a given block in the parent, that block will not be sent; but if one or more snapshots have not modified a block in the parent, they will still reference the parent's block, so that block will be sent.

:D
 
Is there a way of sending a recursive snapshot but excluding a particular dataset?
No. In that case you need to send datasets individually.

Or you can just move the excluded dataset out of the backed up hierarchy.
E.g., here I have zroot/home and zroot/home-nobackup datasets.
Then, zroot/home/avg and zroot/home/avg/important-stuff. But zroot/home-nobackup/avg/tmp.
I hope that explains the idea.
 
Back
Top