You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done a function SendSnapshotIncremental that add the options "-i" et "-I". As I don't know if this project is till active, before to do a pull request, I open this issue.
// SendFlag is the options flags passed to SendSnapshot
type SendFlag int
// Valid send options
const (
SendDefault SendFlag = 1 << iota
IncrementalStream = 1 << iota
IncrementalPackage = 1 << iota
)
func SendSnapshotIncremental(output io.Writer, d1 *Dataset, d2 *Dataset, flags SendFlag) error {
if d1.Type != DatasetSnapshot || d2.Type != DatasetSnapshot {
return errors.New("can only send snapshots")
}
// Flags for SendSnapshot
option := ""
if flags&IncrementalStream !=0 {
option = "-i"
}
if flags&IncrementalPackage !=0 {
option = "-I"
}
c := command{Command: "zfs", Stdout: output}
_, err := c.Run("send", option, d1.Name, d2.Name)
return err
}
Anyway, If there are anybody who can improve it, this will be perfect !
The text was updated successfully, but these errors were encountered:
Hello all,
I have done a function SendSnapshotIncremental that add the options "-i" et "-I". As I don't know if this project is till active, before to do a pull request, I open this issue.
Anyway, If there are anybody who can improve it, this will be perfect !
The text was updated successfully, but these errors were encountered: