Change user/host information in kopia (#328)

These fields can be used to lookup snapshots in kopia as they are part
of the `Source` struct. They are also stored in the kopia sessions but
they should not cause session collisions. Sessions have unique IDs to go
along with this information.
This commit is contained in:
ashmrtn 2022-07-12 16:12:58 -07:00 committed by GitHub
parent efe4319080
commit 36346548d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,8 @@ import (
const ( const (
// TODO(ashmrtnz): These should be some values from upper layer corso, // TODO(ashmrtnz): These should be some values from upper layer corso,
// possibly corresponding to who is making the backup. // possibly corresponding to who is making the backup.
kTestHost = "a-test-machine" corsoHost = "corso-host"
kTestUser = "testUser" corsoUser = "corso"
) )
var ( var (
@ -255,8 +255,8 @@ func (w Wrapper) makeSnapshotWithRoot(
details *backup.Details, details *backup.Details,
) (*BackupStats, error) { ) (*BackupStats, error) {
si := snapshot.SourceInfo{ si := snapshot.SourceInfo{
Host: kTestHost, Host: corsoHost,
UserName: kTestUser, UserName: corsoUser,
// TODO(ashmrtnz): will this be something useful for snapshot lookups later? // TODO(ashmrtnz): will this be something useful for snapshot lookups later?
Path: root.Name(), Path: root.Name(),
} }