PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
1. Log rotation test
- 1.1 In
backend/internal/util/logger/file_sink_test.go, turn the "at most four files" assertion ofTest_RotatingFileWriter_WhenSizeExceeded_KeepsAtMostMaxBackupsPlusActiveinto anassert.Eventuallypoll with a deadline of a few seconds (design.md - Decision 3). Keep the "more than one file" and per-file size checks, run after the poll. Verify withjust test-package -count=50 -run Test_RotatingFileWriter ./internal/util/logger/frombackend/.
2. Container boot retry
- 2.1 In
backend/internal/util/testing/containers/containers.go, move theGenericContainercall into one shared function that bothstartContainerandstartUnpublishedcall. It makes up to three attempts, terminates the container a failed attempt returned, logs each failed attempt witht.Logf(attempt number, image, error), and fails the test with the last error and the attempt count (design.md - Decision 1). Verify that real containers boot through the new path withjust test-package ./internal/features/databases/databases/mongodb/... ./internal/features/databases/databases/mysql/...frombackend/, and check the terminate-and-log branch by reading the diff.
3. Bastion readiness after restart
- 3.1 In
backend/internal/features/tests/physical/postgresql/shared/sshtunnel.go, replace the TCP dial inwaitForBastionAcceptingwith an authenticated SSH handshake usingSshBastionUsernameandSshBastionPassword, retried every 500 ms under the existing 90-second deadline. Rename the function after what it now proves and update its comment (design.md - Decision 2). Verify withjust test-package -run Test_PhysicalWalStream_WhenTheBastionDiesMidStream ./internal/features/tests/physical/postgresql/...frombackend/.
4. Lint
- 4.1 Run
just lintinbackend/and fix every finding in the touched files.