Cluster-based PostgreSQL discovery, bulk database import and scheduled backups #372

Closed
opened 2026-04-05 16:16:19 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @omerkarabacak on 12/8/2025

I’ve implemented cluster-level management for PostgreSQL in Postgresus. A workspace can now define one or more “clusters” with shared connection settings (host/port/user/password/version/HTTPS) and default backup configuration (interval, time of day, store period, storage, notifications, CPU count, exclusions). The backend can discover all accessible, non-system databases on a cluster, keep an exclusion list, and then automatically ensure each discovered database has a corresponding Database + BackupConfig entry that follows the cluster defaults. A background service uses the existing interval logic to run cluster backups on schedule and updates last_run_at; there are also endpoints to preview and apply propagation of cluster defaults (storage, schedule, enable/disable backups) to already configured databases that match the same connection.

On the frontend, I added a new Clusters tab and a Databases → Add database → From cluster flow. The wizard lets you point Postgresus at a PostgreSQL cluster, list accessible databases (excluding templates), select a subset, define a shared backup schedule/storage, pick notifiers, and then bulk-create database entries and backup configs for all selected DBs, with progress feedback. The existing “single database” flow remains the default and unchanged, so this should be fully backward compatible and opt‑in. If this direction fits the project’s roadmap, I’m happy to polish the implementation, add tests/docs as needed, and open a PR from my fork; otherwise I can keep maintaining this as a forked extension.

*Originally created by @omerkarabacak on 12/8/2025* I’ve implemented cluster-level management for PostgreSQL in Postgresus. A workspace can now define one or more “clusters” with shared connection settings (host/port/user/password/version/HTTPS) and default backup configuration (interval, time of day, store period, storage, notifications, CPU count, exclusions). The backend can discover all accessible, non-system databases on a cluster, keep an exclusion list, and then automatically ensure each discovered database has a corresponding Database + BackupConfig entry that follows the cluster defaults. A background service uses the existing interval logic to run cluster backups on schedule and updates last_run_at; there are also endpoints to preview and apply propagation of cluster defaults (storage, schedule, enable/disable backups) to already configured databases that match the same connection. On the frontend, I added a new Clusters tab and a Databases → Add database → From cluster flow. The wizard lets you point Postgresus at a PostgreSQL cluster, list accessible databases (excluding templates), select a subset, define a shared backup schedule/storage, pick notifiers, and then bulk-create database entries and backup configs for all selected DBs, with progress feedback. The existing “single database” flow remains the default and unchanged, so this should be fully backward compatible and opt‑in. If this direction fits the project’s roadmap, I’m happy to polish the implementation, add tests/docs as needed, and open a PR from my fork; otherwise I can keep maintaining this as a forked extension.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#372