Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Allow incremental backups for multiple data categories if some metada…
Browse files Browse the repository at this point in the history
…ta is missing (#2030)

## Description

Don't return nil if we had an error getting metadata. This gives us the best chance possible of having enough metadata retrieved from the best-effort restore execution flow to actually enable incrementals for some data category.

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

- [ ] ✅ Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x] ⛔ No 

## Type of change

- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

## Issue(s)

* #1777 

## Test Plan

- [x] 💪 Manual
- [ ] ⚡ Unit test
- [ ] 💚 E2E
  • Loading branch information
ashmrtn authored Jan 4, 2023
1 parent 76984c2 commit 84db56c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/internal/operations/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,10 @@ func collectMetadata(

dcs, err := r.RestoreMultipleItems(ctx, string(man.ID), paths, nil)
if err != nil {
return nil, errors.Wrap(err, "collecting prior metadata")
// Restore is best-effort and we want to keep it that way since we want to
// return as much metadata as we can to reduce the work we'll need to do.
// Just wrap the error here for better reporting/debugging.
return dcs, errors.Wrap(err, "collecting prior metadata")
}

return dcs, nil
Expand Down

0 comments on commit 84db56c

Please sign in to comment.