Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added --smartIntermediaryIncremental so that intermediary incremental… #458

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -177,6 +177,12 @@ func init() {
10,
"the chunk size, in MiB, to use when uploading. A minimum of 5MiB and maximum of 100MiB is enforced.",
)
sendCmd.Flags().BoolVar(
&jobInfo.SmartIntermediaryIncremental,
"smartIntermediaryIncremental",
false,
"store intermediary snapshots when using smart options",
)
}

// ResetSendJobInfo exists solely for integration testing
Expand Down
41 changes: 21 additions & 20 deletions files/jobinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,27 @@ var (
// 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
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
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