Allow zfs to send replication streams with missing snapshots

A tentative implementation and discussion was done in #5285.
According to it a send --skip-missing|-s flag has been added.
In a replication stream, when there are snapshots missing in
the hierarchy, if -s is provided print a warning and ignore
dataset (and its children) instead of throwing an error

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
Closes #11710
This commit is contained in:
pablofsf
2021-04-11 21:05:35 +02:00
committed by GitHub
parent 2ec0b0dd71
commit 099fa7e475
7 changed files with 126 additions and 18 deletions
+8 -2
View File
@@ -39,12 +39,12 @@
.Sh SYNOPSIS
.Nm zfs
.Cm send
.Op Fl DLPRbcehnpvw
.Op Fl DLPRsbcehnpvw
.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
.Ar snapshot
.Nm zfs
.Cm send
.Op Fl DLPRcenpvw
.Op Fl DLPRscenpvw
.Op Fl i Ar snapshot Ns | Ns Ar bookmark
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
.Nm zfs
@@ -139,6 +139,12 @@ do not exist on the sending side are destroyed. If the
flag is used to send encrypted datasets, then
.Fl w
must also be specified.
.It Fl s, -skip-missing
Allows sending a replication stream even when there are snapshots missing in the
hierarchy. When a snapshot is missing, instead of throwing an error and aborting
the send, a warning is printed to STDERR and the dataset to which it belongs
and its descendents are skipped. This flag can only be used in conjunction with
.Fl R .
.It Fl e, -embed
Generate a more compact stream by using
.Sy WRITE_EMBEDDED