Delete details snapshot on backup delete (#2166)
## Description Don't leave orphaned details snapshots when a backup is being deleted. ## 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) * closes #2152 ## Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
6f67d9744a
commit
81625532bb
@ -325,6 +325,10 @@ func (r repository) DeleteBackup(ctx context.Context, id model.StableID) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := r.dataLayer.DeleteSnapshot(ctx, bu.DetailsID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
sw := store.NewKopiaStore(r.modelStore)
|
||||
|
||||
return sw.DeleteBackup(ctx, id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user