mirror of https://github.com/restic/restic.git
Add field RepoSizeMax to global.go, Add field PartialSnapshot to Snapshot
in preparation to limit repository size during backup.
This commit is contained in:
parent
3d02451498
commit
bf227e6237
|
@ -73,6 +73,7 @@ type GlobalOptions struct {
|
|||
PackSize uint
|
||||
NoExtraVerify bool
|
||||
InsecureNoPassword bool
|
||||
RepoSizeMax uint64
|
||||
|
||||
backend.TransportOptions
|
||||
limiter.Limits
|
||||
|
@ -485,6 +486,7 @@ func OpenRepository(ctx context.Context, opts GlobalOptions) (*repository.Reposi
|
|||
Compression: opts.Compression,
|
||||
PackSize: opts.PackSize * 1024 * 1024,
|
||||
NoExtraVerify: opts.NoExtraVerify,
|
||||
RepoSizeMax: opts.RepoSizeMax,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Fatal(err.Error())
|
||||
|
|
|
@ -25,8 +25,9 @@ type Snapshot struct {
|
|||
Tags []string `json:"tags,omitempty"`
|
||||
Original *ID `json:"original,omitempty"`
|
||||
|
||||
ProgramVersion string `json:"program_version,omitempty"`
|
||||
Summary *SnapshotSummary `json:"summary,omitempty"`
|
||||
ProgramVersion string `json:"program_version,omitempty"`
|
||||
PartialSnapshot bool `json:"partial_snapshot,omitempty"`
|
||||
Summary *SnapshotSummary `json:"summary,omitempty"`
|
||||
|
||||
id *ID // plaintext ID, used during restore
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue