1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00

Merge pull request #3993 from MichaelEischer/backup-json-full-snapshot-id

backup: print full snapshot id in JSON summary
This commit is contained in:
Michael Eischer 2022-11-12 20:42:35 +01:00 committed by GitHub
commit 32ffcd86a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View 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

View file

@ -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,
TotalBytesProcessed: summary.ProcessedBytes,
TotalDuration: time.Since(start).Seconds(),
SnapshotID: snapshotID.Str(),
SnapshotID: snapshotID.String(),
DryRun: dryRun,
})
}