mirror of
https://github.com/databasus/databasus.git
synced 2026-04-06 00:32:03 +02:00
Cluster-based PostgreSQL discovery, bulk database import and scheduled backups #372
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.