mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 04:45:15 +00:00
backup: print full snapshot id in JSON summary
This commit is contained in:
parent
4f1fae9c98
commit
06141ce1f4
9
changelog/unreleased/issue-2724
Normal file
9
changelog/unreleased/issue-2724
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Change: Include full snapshot ID in JSON output of the bacukp command
|
||||||
|
|
||||||
|
We have changed the JSON output of the backup command to include the full snapshot ID instead of just a shortened version.
|
||||||
|
The latter can be ambiguous in rare cases.
|
||||||
|
|
||||||
|
To derive the short ID, truncate the full ID down to 8 characters.
|
||||||
|
|
||||||
|
https://github.com/restic/restic/issues/2724
|
||||||
|
https://github.com/restic/restic/pull/3993
|
@ -191,7 +191,7 @@ func (b *JSONProgress) Finish(snapshotID restic.ID, start time.Time, summary *Su
|
|||||||
TotalFilesProcessed: summary.Files.New + summary.Files.Changed + summary.Files.Unchanged,
|
TotalFilesProcessed: summary.Files.New + summary.Files.Changed + summary.Files.Unchanged,
|
||||||
TotalBytesProcessed: summary.ProcessedBytes,
|
TotalBytesProcessed: summary.ProcessedBytes,
|
||||||
TotalDuration: time.Since(start).Seconds(),
|
TotalDuration: time.Since(start).Seconds(),
|
||||||
SnapshotID: snapshotID.Str(),
|
SnapshotID: snapshotID.String(),
|
||||||
DryRun: dryRun,
|
DryRun: dryRun,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user