PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
1. Storage command
- 1.1 Add
--test-storageto the main backend binary; save a unique probe withLocalStorage.SaveFile, delete it withLocalStorage.DeleteFile, and verify focused command tests pass - 1.2 Start Valkey before running the storage command, retain explicit Valkey client injection in cache utilities, rate limiters, and publish-subscribe setup, and verify storage failures still stop PostgreSQL and the Databasus application
- 1.3 Detect test mode from the executable name instead of arbitrary command-line arguments, verify
--test-storageuses production configuration without test database settings, and remove the separate filesystem-check binary and lifecycle-specific model changes
2. Container runtime identity and services
- 2.1 Replace the two image accounts and four identity variables with one
databasusaccount plus validated optionalPUIDandPGID; verify mounted pgdata discovery, automatic, explicit, partial, invalid, and collision cases - 2.2 Prepare mounted paths without treating failed
chownorchmodas failure, then run real capability checks before PostgreSQL and the Databasus application; verify writable restricted mounts start and inaccessible mounts fail with the documented error - 2.3 Run PostgreSQL and Valkey under
databasus, use bootstrap-only peer mapping to rolepostgres, reject runtime socket login, and keep loopback SCRAM; verify process IDs and authentication cases in the container suite - 2.4 Preserve existing secret, control-file, application-log, nested WAL-queue, PostgreSQL, and deprecated-directory behavior; verify the filesystem-related guard and upgrade fixtures pass
- 2.5 Move runtime startup into
docker/start.sh, organize it around named functions and a shortmain, and keep theDockerfilefocused on image construction and entrypoint declaration
3. Filesystem regression suite
- 3.1 Replace only the temporary-to-backup probes with
databasus --test-storage, retain focused PostgreSQL, socket, and control-file checks, and verify ext4 bind, named-volume, and split-filesystem cases - 3.2 Cover CIFS group
999with mode0770, fixed file modes, and local temporary storage; verify publication succeeds without required metadata changes - 3.3 Cover writable root-squashed NFS plus read-only, wrong-owner, and unwritable data-root failures; verify allowed operations start and rejected operations emit the exact actionable error
- 3.4 Add upgrade fixtures for
v3.54.0,v3.55.0,v3.55.1, andv3.56.0; verify metadata, secret key, application log, backup marker, nested WAL queue, and PostgreSQL cluster survive - 3.5 Remove tracker-number inventory and two-account assumptions from the harness; verify ShellCheck and Actionlint pass
- 3.6 Run ShellCheck against
docker/start.shand verify the copied script in the candidate image is byte-identical and executable
4. Documentation and specifications
- 4.1 Update all six Advanced Config pages with the single-account model,
PUID/PGID, automatic selection, failure message, migration note, and English documentation link; verify website lint and build pass - 4.2 Update Helm README and values wording for the same identity model; verify no removed identity variable remains in user documentation
- 4.3 Synchronize the remaining delta specs into the main specs, leave the local-storage model contract unchanged, and verify
openspec validate --strictpasses
5. Final verification
- 5.1 Run backend formatting, focused tests, full tests, and
make lint; resolve every failure - 5.2 Build the candidate image and run
make test-filesystems; resolve every filesystem or upgrade regression - 5.3 Run the mandatory post-implementation reviewer against the complete diff and module rules, resolve every
CHANGES REQUIREDfinding, and leave the working tree ready to commit