Is there a way to send a single snapshot including descendant file systems? 'zfs send' only sends the the top level file system even if the snapshot was created using '-r'. 'zfs send -R' sends the descendant file systems but includes all the previous snapshots, which for disaster recovery purposes consumes unnecessary space if the previous snapshots are not needed in the disaster recovery pool.
cat /sys/module/zfs/version 0.8.3-1ubuntu12.5
I perfectly understand your use case. Although I for one am usually faced with the oppositie situation where I have a remote backup pool from which I want to restore the latest snapshot on a local system.
In any case, while you cannot achieve what you want in a direct way, you can reach the desired state. The idea is to prune your recovery set so that it only has the latest snapshot. You start by sending an initial snapshot:
This will send all descending file systems, and will send the
initial_snapshotand all those created before it. If you thus had created any snapshots prior, you can delete them:Then you send incremental updates and prune,
assuming that
LATEST_LOCAL_SNAPSHOTandLATEST_REMOTE_SNAPSHOTare appropriately set.Please mind that this is a minimal seatbelt-less example. You should care about whether your send-receives are successful. If accidently reach the state where your recovery pool does not have any snapshots that match your source, you can no longer send increments and will thus need to start anew.