Check for backups using PITR in corso (#3969)
After we delete backups, make sure we can still open an old version of the repo and list them. --- #### 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 - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [x] 🤖 Supportability/Tests - [x] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Issue(s) * #3799 #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
5fcb8a1f4d
commit
5af774d2ff
@ -67,9 +67,6 @@ func deleteBackups(
|
|||||||
// pitrListBackups connects to the repository at the given point in time and
|
// pitrListBackups connects to the repository at the given point in time and
|
||||||
// lists the backups for service. It then checks the list of backups contains
|
// lists the backups for service. It then checks the list of backups contains
|
||||||
// the backups in backupIDs.
|
// the backups in backupIDs.
|
||||||
//
|
|
||||||
//nolint:unused
|
|
||||||
//lint:ignore U1000 Waiting for full support.
|
|
||||||
func pitrListBackups(
|
func pitrListBackups(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
service path.ServiceType,
|
service path.ServiceType,
|
||||||
@ -153,9 +150,15 @@ func main() {
|
|||||||
fatal(ctx, "invalid number of days provided", nil)
|
fatal(ctx, "invalid number of days provided", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = deleteBackups(ctx, service, days)
|
beforeDel := time.Now()
|
||||||
|
|
||||||
|
backups, err := deleteBackups(ctx, service, days)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fatal(cc.Context(), "deleting backups", clues.Stack(err))
|
fatal(ctx, "deleting backups", clues.Stack(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := pitrListBackups(ctx, service, beforeDel, backups); err != nil {
|
||||||
|
fatal(ctx, "listing backups from point in time", clues.Stack(err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user