zfs send/recv: Support raw sends (-w/-Lce) and property handling (-p, -b, -o, -x)
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
+12
-2
@@ -153,9 +153,16 @@ func modePushFromConfig(g *config.Global, in *config.PushJob, jobID endpoint.Job
|
||||
|
||||
m.senderConfig = &endpoint.SenderConfig{
|
||||
FSF: fsf,
|
||||
Encrypt: &zfs.NilBool{B: in.Send.Encrypted},
|
||||
DisableIncrementalStepHolds: in.Send.StepHolds.DisableIncremental,
|
||||
JobID: jobID,
|
||||
DisableIncrementalStepHolds: in.Send.StepHolds.DisableIncremental,
|
||||
|
||||
Encrypt: &zfs.NilBool{B: in.Send.Encrypted},
|
||||
SendRaw: in.Send.Raw,
|
||||
SendProperties: in.Send.SendProperties,
|
||||
SendBackupProperties: in.Send.BackupProperties,
|
||||
SendLargeBlocks: in.Send.LargeBlocks,
|
||||
SendCompressed: in.Send.Compressed,
|
||||
SendEmbeddedData: in.Send.EmbeddedData,
|
||||
}
|
||||
m.plannerPolicy = &logic.PlannerPolicy{
|
||||
EncryptedSend: logic.TriFromBool(in.Send.Encrypted),
|
||||
@@ -264,6 +271,9 @@ func modePullFromConfig(g *config.Global, in *config.PullJob, jobID endpoint.Job
|
||||
RootWithoutClientComponent: m.rootFS,
|
||||
AppendClientIdentity: false, // !
|
||||
UpdateLastReceivedHold: true,
|
||||
|
||||
InheritProperties: in.Recv.Properties.Inherit,
|
||||
OverrideProperties: in.Recv.Properties.Override,
|
||||
}
|
||||
if err := m.receiverConfig.Validate(); err != nil {
|
||||
return nil, errors.Wrap(err, "cannot build receiver config")
|
||||
|
||||
+12
-2
@@ -58,6 +58,9 @@ func modeSinkFromConfig(g *config.Global, in *config.SinkJob, jobID endpoint.Job
|
||||
RootWithoutClientComponent: rootDataset,
|
||||
AppendClientIdentity: true, // !
|
||||
UpdateLastReceivedHold: true,
|
||||
|
||||
InheritProperties: in.Recv.Properties.Inherit,
|
||||
OverrideProperties: in.Recv.Properties.Override,
|
||||
}
|
||||
if err := m.receiverConfig.Validate(); err != nil {
|
||||
return nil, errors.Wrap(err, "cannot build receiver config")
|
||||
@@ -80,9 +83,16 @@ func modeSourceFromConfig(g *config.Global, in *config.SourceJob, jobID endpoint
|
||||
}
|
||||
m.senderConfig = &endpoint.SenderConfig{
|
||||
FSF: fsf,
|
||||
Encrypt: &zfs.NilBool{B: in.Send.Encrypted},
|
||||
DisableIncrementalStepHolds: in.Send.StepHolds.DisableIncremental,
|
||||
JobID: jobID,
|
||||
DisableIncrementalStepHolds: in.Send.StepHolds.DisableIncremental,
|
||||
|
||||
Encrypt: &zfs.NilBool{B: in.Send.Encrypted},
|
||||
SendRaw: in.Send.Raw,
|
||||
SendProperties: in.Send.SendProperties,
|
||||
SendBackupProperties: in.Send.BackupProperties,
|
||||
SendLargeBlocks: in.Send.LargeBlocks,
|
||||
SendCompressed: in.Send.Compressed,
|
||||
SendEmbeddedData: in.Send.EmbeddedData,
|
||||
}
|
||||
|
||||
if m.snapper, err = snapper.FromConfig(g, fsf, in.Snapshotting); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user