Want 'zfs send -b'

This change implements 'zfs send -b' which can be used to send only
received property values whether or not they are overridden by local
settings.

This can be very useful during "restore" operations from a backup pool
because it allows to send only the property values originally sent
from the backup source, even though they were later modified on the
destination either by a 'zfs set' operation, explicit 'zfs inherit' or
overridden during the receive process via 'zfs receive -o|-x'.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7156
This commit is contained in:
LOLi
2018-02-21 21:32:06 +01:00
committed by Brian Behlendorf
parent b0918402dc
commit faa97c1619
9 changed files with 257 additions and 120 deletions
+10 -2
View File
@@ -194,7 +194,7 @@
.Ar snapshot bookmark
.Nm
.Cm send
.Op Fl DLPRcenpvw
.Op Fl DLPRbcenpvw
.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
.Ar snapshot
.Nm
@@ -3321,7 +3321,7 @@ feature.
.It Xo
.Nm
.Cm send
.Op Fl DLPRcenpvw
.Op Fl DLPRbcenpvw
.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
.Ar snapshot
.Xc
@@ -3417,6 +3417,14 @@ See
for details on ZFS feature flags and the
.Sy embedded_data
feature.
.It Fl b, -backup
Sends only received property values whether or not they are overridden by local
settings, but only if the dataset has ever been received. Use this option when
you want
.Nm zfs Cm receive
to restore received properties backed up on the sent dataset and to avoid
sending local settings that may have nothing to do with the source dataset,
but only with how the data is backed up.
.It Fl c, -compressed
Generate a more compact stream by using compressed WRITE records for blocks
which are compressed on disk and in memory