PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
REFACTOR (backups): State the storage constraint rather than what changed
Rostislav Dugine76f4785d4c6
diff --git a/backend/internal/features/backups/backups/backuping/logical/cleaner.go b/backend/internal/features/backups/backups/backuping/logical/cleaner.goindex 241e7541..7feb3cd7 100644--- a/backend/internal/features/backups/backups/backuping/logical/cleaner.go+++ b/backend/internal/features/backups/backups/backuping/logical/cleaner.go@@ -84,7 +84,7 @@ func (c *BackupCleaner) DeleteBackup(ctx context.Context, backup *backups_core_l}// The row and the obligation to remove its files commit together, so an- // unreachable storage no longer decides whether the row may go, and a rolled+ // unreachable storage does not decide whether the row may go, and a rolled// back removal leaves the files where the row still names them.return db.GetDb().Transaction(func(tx *gorm.DB) error {if err := c.fileStore.RequestFileDeletions(ctx, tx, references); err != nil {diff --git a/backend/internal/features/backups/backups/usecases/physical/postgresql/wal_upload_test.go b/backend/internal/features/backups/backups/usecases/physical/postgresql/wal_upload_test.goindex acacf918..335778f3 100644--- a/backend/internal/features/backups/backups/usecases/physical/postgresql/wal_upload_test.go+++ b/backend/internal/features/backups/backups/usecases/physical/postgresql/wal_upload_test.go@@ -373,7 +373,7 @@ func Test_WalUpload_RecoverSegment_WhenAlreadyCommitted_DropsLocalNoReupload(t *name := walName(1, 29)- // A normal upload commits the segment (crash happened after MarkUploaded).+ // A normal upload commits the segment (the crash landed after the commit).dir1 := t.TempDir()require.NoError(t, uploader.ProcessSegment(context.Background(), writeWalFile(t, dir1, name), name))diff --git a/openspec/changes/ensure-storage-file-cleanup/tasks.md b/openspec/changes/ensure-storage-file-cleanup/tasks.mdindex 3c98bfd8..b5b8124e 100644--- a/openspec/changes/ensure-storage-file-cleanup/tasks.md+++ b/openspec/changes/ensure-storage-file-cleanup/tasks.md@@ -75,4 +75,4 @@- [x] 11.1 Run focused logical, physical, WAL, cleaner, storage lifecycle and provider cleanup tests, including the MinIO integration suite, and confirm no test depends on timing sleeps instead of controllable worker passes.- [x] 11.2 Run `make lint` and the repository backend test command (`make test` in the dev container or `make test-fedora` on supported Fedora), then resolve every failure without weakening security or cleanup assertions. 62 of 63 packages pass; `internal/features/tests/logical/mariadb` fails on a clean tree too, on a container this environment cannot bring up healthily, so it is not this change's regression.- [x] 11.3 Run `openspec validate ensure-storage-file-cleanup --strict` and resolve every validation error.-- [ ] 11.4 Request the mandatory final reviewer audit against the root and backend agent rules, resolve every `CHANGES REQUIRED` finding and rerun the affected linters and tests.+- [x] 11.4 Request the mandatory final reviewer audit against the root and backend agent rules, resolve every `CHANGES REQUIRED` finding and rerun the affected linters and tests.