Skip to content

Commit

Permalink
fix(someone1#458): Added --smartintermediaryincremental.
Browse files Browse the repository at this point in the history
Signed-off-by: Johnathan Falk <[email protected]>
  • Loading branch information
jdfalk committed Nov 13, 2022
1 parent 8dcc804 commit 6e7d53c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
1 change: 1 addition & 0 deletions backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func ProcessSmartOptions(ctx context.Context, jobInfo *files.JobInfo) error {
}
jobInfo.IncrementalSnapshot = *lastBackup[0]
}
jobInfo.IntermediaryIncremental = jobInfo.SmartIntermediaryIncremental
return nil
}

Expand Down
6 changes: 6 additions & 0 deletions cmd/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ func init() {
"",
"the local volume name if different from the S3 volume",
)
sendCmd.Flags().BoolVar(
&jobInfo.SmartIntermediaryIncremental,
"smartIntermediaryIncremental",
false,
"store intermediary snapshots when using smart options",
)
}

// ResetSendJobInfo exists solely for integration testing
Expand Down
43 changes: 21 additions & 22 deletions files/jobinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,27 @@ var disallowedSeps = regexp.MustCompile(`^[\w\-:\.]+`) // Disallowed by ZFS
// JobInfo represents the relevant information for a job that can be used to read
// in details of that job at a later time.
type JobInfo struct {
StartTime time.Time
EndTime time.Time
VolumeName string
BaseSnapshot SnapshotInfo
IncrementalSnapshot SnapshotInfo
SnapshotPrefix string
Raw bool
Compressor string
CompressionLevel int
Separator string
ZFSCommandLine string
ZFSStreamBytes uint64
Volumes []*VolumeInfo
Version float64
EncryptTo string
SignFrom string
Replication bool
SkipMissing bool
Deduplication bool
Properties bool
IntermediaryIncremental bool
Resume bool `json:"-"`
StartTime time.Time
EndTime time.Time
VolumeName string
BaseSnapshot SnapshotInfo
IncrementalSnapshot SnapshotInfo
SnapshotPrefix string
Compressor string
CompressionLevel int
Separator string
ZFSCommandLine string
ZFSStreamBytes uint64
Volumes []*VolumeInfo
Version float64
EncryptTo string
SignFrom string
Replication bool
Deduplication bool
Properties bool
IntermediaryIncremental bool
SmartIntermediaryIncremental bool
Resume bool `json:"-"`
// "Smart" Options
Full bool `json:"-"`
Incremental bool `json:"-"`
Expand Down

0 comments on commit 6e7d53c

Please sign in to comment.