add logging indicating full backups (#3721)

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🤖 Supportability/Tests

#### Issue(s)

* #3720
This commit is contained in:
Keepers 2023-06-30 17:02:01 -06:00 committed by GitHub
parent b74f65e301
commit 5949a3bcd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 4 deletions

View File

@ -208,6 +208,8 @@ func ProduceBackupCollections(
return nil, nil, false, err
}
ctx = clues.Add(ctx, "can_use_previous_backup", canUsePreviousBackup)
for _, scope := range eb.Scopes() {
if el.Failure() != nil {
break

View File

@ -234,6 +234,8 @@ func (c *Collections) Get(
return nil, false, err
}
ctx = clues.Add(ctx, "can_use_previous_backup", canUsePreviousBackup)
driveTombstones := map[string]struct{}{}
for driveID := range oldPathsByDriveID {

View File

@ -297,7 +297,7 @@ func (op *BackupOperation) do(
return nil, clues.Stack(err)
}
mans, mdColls, canUseMetaData, err := produceManifestsAndMetadata(
mans, mdColls, canUseMetadata, err := produceManifestsAndMetadata(
ctx,
kbf,
op.kopia,
@ -308,7 +308,9 @@ func (op *BackupOperation) do(
return nil, clues.Wrap(err, "producing manifests and metadata")
}
if canUseMetaData {
ctx = clues.Add(ctx, "can_use_metadata", canUseMetadata)
if canUseMetadata {
lastBackupVersion = mans.MinBackupVersion()
}
@ -325,7 +327,10 @@ func (op *BackupOperation) do(
return nil, clues.Wrap(err, "producing backup data collections")
}
ctx = clues.Add(ctx, "coll_count", len(cs))
ctx = clues.Add(
ctx,
"can_use_previous_backup", canUsePreviousBackup,
"collection_count", len(cs))
writeStats, deets, toMerge, err := consumeBackupCollections(
ctx,
@ -336,7 +341,7 @@ func (op *BackupOperation) do(
cs,
ssmb,
backupID,
op.incremental && canUseMetaData && canUsePreviousBackup,
op.incremental && canUseMetadata && canUsePreviousBackup,
op.Errors)
if err != nil {
return nil, clues.Wrap(err, "persisting collection backups")
@ -476,6 +481,8 @@ func consumeBackupCollections(
isIncremental bool,
errs *fault.Bus,
) (*kopia.BackupStats, *details.Builder, kopia.DetailsMergeInfoer, error) {
ctx = clues.Add(ctx, "collection_source", "operations")
complete := observe.MessageWithCompletion(ctx, "Backing up data")
defer func() {
complete <- struct{}{}

View File

@ -229,6 +229,8 @@ func write(
dbcs []data.BackupCollection,
errs *fault.Bus,
) (string, error) {
ctx = clues.Add(ctx, "collection_source", "streamstore")
backupStats, _, _, err := bup.ConsumeBackupCollections(
ctx,
nil,