Skip to content

Commit 6e7d53c

Browse files
committed
fix(someone1#458): Added --smartintermediaryincremental.
Signed-off-by: Johnathan Falk <johnathan.falk@gmail.com>
1 parent 8dcc804 commit 6e7d53c

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

backup/backup.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func ProcessSmartOptions(ctx context.Context, jobInfo *files.JobInfo) error {
160160
}
161161
jobInfo.IncrementalSnapshot = *lastBackup[0]
162162
}
163+
jobInfo.IntermediaryIncremental = jobInfo.SmartIntermediaryIncremental
163164
return nil
164165
}
165166

cmd/send.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ func init() {
185185
"",
186186
"the local volume name if different from the S3 volume",
187187
)
188+
sendCmd.Flags().BoolVar(
189+
&jobInfo.SmartIntermediaryIncremental,
190+
"smartIntermediaryIncremental",
191+
false,
192+
"store intermediary snapshots when using smart options",
193+
)
188194
}
189195

190196
// ResetSendJobInfo exists solely for integration testing

files/jobinfo.go

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,27 @@ var disallowedSeps = regexp.MustCompile(`^[\w\-:\.]+`) // Disallowed by ZFS
3737
// JobInfo represents the relevant information for a job that can be used to read
3838
// in details of that job at a later time.
3939
type JobInfo struct {
40-
StartTime time.Time
41-
EndTime time.Time
42-
VolumeName string
43-
BaseSnapshot SnapshotInfo
44-
IncrementalSnapshot SnapshotInfo
45-
SnapshotPrefix string
46-
Raw bool
47-
Compressor string
48-
CompressionLevel int
49-
Separator string
50-
ZFSCommandLine string
51-
ZFSStreamBytes uint64
52-
Volumes []*VolumeInfo
53-
Version float64
54-
EncryptTo string
55-
SignFrom string
56-
Replication bool
57-
SkipMissing bool
58-
Deduplication bool
59-
Properties bool
60-
IntermediaryIncremental bool
61-
Resume bool `json:"-"`
40+
StartTime time.Time
41+
EndTime time.Time
42+
VolumeName string
43+
BaseSnapshot SnapshotInfo
44+
IncrementalSnapshot SnapshotInfo
45+
SnapshotPrefix string
46+
Compressor string
47+
CompressionLevel int
48+
Separator string
49+
ZFSCommandLine string
50+
ZFSStreamBytes uint64
51+
Volumes []*VolumeInfo
52+
Version float64
53+
EncryptTo string
54+
SignFrom string
55+
Replication bool
56+
Deduplication bool
57+
Properties bool
58+
IntermediaryIncremental bool
59+
SmartIntermediaryIncremental bool
60+
Resume bool `json:"-"`
6261
// "Smart" Options
6362
Full bool `json:"-"`
6463
Incremental bool `json:"-"`

0 commit comments

Comments
 (0)