Databasement

Self-hosted database backup manager with a web UI for scheduling, encrypting, and restoring MySQL, PostgreSQL, MongoDB, SQL Server, SQLite, Firebird, and Redis to S3, SFTP, Samba, or local storage.

2Kstars
210forks
MIT License
PHP

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
81/100Excellent
Development Activity96
Maintenance100
Community56
Maturity32
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture84
Code Quality85
Innovation62
Learning Curve75

Dependency Health

Score based on the health, technical quality, freshness, and vulnerability profile of runtime dependencies.How we score it →
69/100Good
Library Repo Health69
Library Technical Quality81
Version Staleness78
Vulnerabilities34
Dependency Footprint74

Databasement is a self-hosted database backup manager built on Laravel and Livewire that gives homelab operators and infrastructure teams a single web UI to schedule, run, and restore backups across MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, MongoDB, SQLite, Firebird, and Redis/Valkey. Rather than stitching together cron jobs and shell scripts around each engine’s own dump tool, it wraps mariadb-dump, pg_dump, sqlpackage, mongodump, gbak, and redis-cli --rdb behind a consistent scheduling, storage, and notification layer, and ships as a single Docker container with a built-in web server, queue worker, and scheduler.

Backups can be compressed with gzip or zstd, or protected with AES-256 encrypted compression, and shipped to local disk, S3-compatible object storage (AWS S3, MinIO), Azure Blob Storage, Samba/SMB shares, or SFTP/FTP servers. For databases that live behind a firewall, Databasement can either tunnel out over SSH to a bastion host or use a lightweight remote agent that connects out over HTTPS from an isolated network with no inbound port required, letting it back up production systems that would otherwise be unreachable from a central backup server.

Restores are cross-server aware: a snapshot taken from production can be replayed onto staging or any other compatible server, either manually or on a recurring schedule that keeps a target environment refreshed with the latest data automatically. Retention is handled with either simple day-based expiry or grandfather-father-son (GFS) rotation, and job failures raise notifications through Email, Slack, Discord, Telegram, Pushover, Gotify, or a generic webhook.

The application is multi-tenant, with isolated organization workspaces, role-based access control, OAuth/OIDC login (Google, GitHub, GitLab), and optional two-factor authentication, making it viable for teams or agencies managing backups for multiple clients or environments from one instance. A REST API and a Model Context Protocol (MCP) server expose the same backup and restore operations for scripting, CI/CD pipelines, and AI coding assistants like Claude Code and Cursor.

What You Get

  • A web UI to register database servers and manage backup schedules, retention, and restores without hand-written cron scripts
  • Native dump/restore support for MySQL, MariaDB, PostgreSQL, SQL Server, MongoDB, SQLite, Firebird, and Redis/Valkey
  • SSH tunnel connectivity and an outbound-only remote agent for databases on private or firewalled networks
  • Storage integrations for local disk, S3-compatible object storage, Azure Blob, Samba/SMB, and SFTP/FTP
  • gzip, zstd, and AES-256 encrypted compression options selectable per backup job
  • Cross-server restore and recurring scheduled-restore refreshes (e.g. nightly prod-to-staging)
  • Multi-tenant organizations with RBAC, OAuth/OIDC SSO, and optional two-factor authentication
  • A REST API and MCP server for scripting backups/restores or driving them from AI assistants

Common Use Cases

  • Homelab or small-team self-hosters backing up Postgres/MySQL instances behind their app stack to a NAS or S3-compatible bucket
  • Ops teams reaching databases inside a private VPC through an SSH bastion without opening inbound firewall rules
  • Backing up databases on air-gapped or firewalled networks using the outbound-only remote agent
  • Nightly scheduled restores that refresh a staging database from the latest production snapshot
  • Agencies or MSPs managing many clients’ database backups from isolated, role-gated organization workspaces
  • SREs or developers triggering on-demand backups or checking job status through the REST API or an MCP-connected AI assistant

Under The Hood

Architecture Databasement is organized into Livewire components (UI), queued Jobs (ProcessBackupJob, ProcessRestoreJob), a Services/Backup core engine, Eloquent models, and an Mcp layer exposing the same actions over the Model Context Protocol. The core engine is interface-driven: DatabaseInterface and FilesystemInterface implementations are resolved through factories (DatabaseProvider, FilesystemProvider, CompressorFactory), so BackupTask orchestrates a clear pipeline — establish an SSH tunnel if required, dump via the resolved database adapter, compress, transfer to the resolved storage adapter, then verify — without needing to know which of the supported engines or storage backends is in play. Livewire components and queue jobs stay thin, delegating to this engine and persisting results back onto job and snapshot models before dispatching notifications. Because each database engine and storage backend is its own adapter class rather than a branching conditional, changing the core interfaces would require touching every adapter, but the fan-out stays organized and each concern is isolated.

Tech Stack Built on Laravel with Livewire for the reactive server-rendered UI, Vite and Tailwind for the frontend build, and a broad set of storage integrations via Flysystem adapters for S3, Azure Blob, SFTP, FTP, and SMB. Authentication and access control layer in Fortify, Socialite (with an OpenID Connect provider) for SSO, Sanctum for API tokens, and a policy-based RBAC package for role management. A dedicated package exposes an MCP server alongside REST API documentation generation. The application deploys as a single Docker container bundling the web server, queue worker, and scheduler, with Kubernetes/Helm and native installation documented as alternatives.

Code Quality An extensive Pest test suite spans unit, feature, and integration layers, covering RBAC-gated actions, backup and restore jobs, snapshot downloads, and MCP tools. Static analysis runs at a strict PHPStan level with narrowly scoped, well-commented exceptions rather than blanket suppressions, formatting is enforced through Pint, and automated refactors run through Rector. Continuous integration runs the test suite, uploads coverage to external analysis services, and validates Docker and Helm packaging on every change. Error handling favors explicit, typed exceptions for backup failures over silent failures, and job state is tracked through a dedicated status enum rather than ad-hoc flags.

What Makes It Unique What sets Databasement apart from narrower backup tools is the combination of broad database engine coverage with two distinct connectivity strategies for hard-to-reach databases: SSH tunneling through a bastion host, and an outbound-only remote agent for fully firewalled networks that never requires an inbound port. Layered on top are scheduled restores that continuously refresh a target environment from the latest snapshot and cross-server restore between compatible engines, plus a first-class MCP server that lets an AI assistant trigger backups or check job status directly. Individually these are established patterns, but bundling this breadth of engines, storage backends, an agent-based firewall bypass, and AI-assistant automation into one self-hosted package is a distinctive combination rather than a commodity backup script wrapper.

Self-Hosting

Licensing Model MIT licensed — all features (multi-database support, SSH tunnels, remote agents, scheduling, restores, multi-tenant RBAC, SSO, REST API, and MCP server) are available in self-hosted deployments with no restrictions or license keys required.

Self-Hosting Restrictions None found. There is no ee/, enterprise/, pro/, or cloud/ directory in the source, and no license-gating logic (isPro, requiresLicense, feature flags) anywhere in the codebase.

Enterprise Features Not applicable — there is no separate paid tier. The project offers a hosted live demo for evaluation, but this mirrors the self-hosted feature set rather than unlocking anything extra.

Cloud vs Self-Hosted Not applicable — Databasement does not offer a managed cloud product; self-hosting (Docker, Docker Compose, Kubernetes/Helm, or native Ubuntu) is the only deployment path.

License Key Required No. The application runs fully licensed under MIT with no activation step.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search