Production-grade backup engine for files and databases with a web UI
Project description
PyBackup Engine
Production-grade backup engine for files and databases — with a built-in web dashboard.
Features
| Feature | Detail |
|---|---|
| Engines | Files, MongoDB, PostgreSQL, MySQL, MS SQL Server |
| Web Dashboard | Pure Python stdlib — no Flask/FastAPI/Django |
| Database | SQLite by default (WAL mode, zero config) |
| CLI | run, verify, checksum, config-check, serve |
| Security | Secrets resolved from env vars, never hard-coded |
| Fonts | Space Grotesk headings · Inter body |
| Theme | Dark / Light toggle |
Install
pip install pybackup
Quick Start
1. Write a config
# pybackup.yaml
version: 1
global:
backup_root: /backups
retention_days: 7
compress: true
log_level: INFO
postgresql:
enabled: true
name: prod-db
host: localhost
port: 5432
database: myapp
username: backup_user
password: ${PGPASSWORD} # resolved from env
files:
enabled: true
name: app-configs
source: /etc/myapp
exclude: ["*.log", "*.tmp"]
2. Run backups
pybackup run --config pybackup.yaml
3. Start the dashboard
pybackup serve --port 8741
# → http://localhost:8741
CLI Reference
pybackup run -c config.yaml [--dry-run]
pybackup verify FILE -s CHECKSUM [-a sha256]
pybackup checksum FILE [-a sha256]
pybackup config-check -c config.yaml
pybackup serve [--host 0.0.0.0] [--port 8741] [--db /path/to.db]
Dashboard
The built-in web server serves a single-page dashboard with:
- Stats cards — total runs, success, failed, success rate
- Activity chart — 30-day bar chart (Chart.js)
- Engine doughnut — breakdown by engine
- Run history — filterable, paginated table with delete support
- Run detail modal — full metadata including error messages
- Settings — theme, retention, log level persisted to SQLite
- Dark / Light theme toggle (Space Grotesk + Inter fonts)
REST API
All served under /api/:
| Method | Path | Description |
|---|---|---|
| GET | /api/stats |
Dashboard statistics |
| GET | /api/runs |
Paginated run list (?limit=&offset=&job=&status=) |
| POST | /api/runs |
Create a run entry |
| GET | /api/runs/:id |
Single run detail + files |
| DELETE | /api/runs/:id |
Delete a run |
| GET | /api/settings |
All settings |
| POST | /api/settings |
Update settings |
Project Structure
pybackup/
├── cli.py # Click CLI entry point
├── constants.py # Global defaults
├── config/
│ └── loader.py # YAML loader + validation
├── engine/
│ ├── base.py # Abstract BaseBackupEngine
│ ├── files.py # File/dir backup
│ ├── mongo.py # MongoDB (mongodump)
│ ├── postgres.py # PostgreSQL (pg_dump)
│ ├── mysql.py # MySQL (mysqldump)
│ ├── mssql.py # MSSQL (sqlcmd)
│ ├── verify.py # Checksum verification
│ └── manifest.py # JSON manifests
├── db/
│ └── database.py # SQLite persistence layer
├── server/
│ ├── httpserver.py # Pure stdlib HTTP server + Router
│ └── handlers.py # REST API handlers
├── static/
│ ├── index.html # SPA dashboard
│ ├── css/app.css # Styles (Space Grotesk + Inter)
│ └── js/app.js # Vanilla JS SPA
└── utils/
├── exceptions.py # Exception hierarchy
├── logger.py # Logging setup
└── security.py # Secret resolution + masking
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybackup_engine-0.1.0.tar.gz
(13.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybackup_engine-0.1.0.tar.gz.
File metadata
- Download URL: pybackup_engine-0.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
582545370bae40bcf30d63023611e4e0889f1f5465e3eb418eb1621d01d288de
|
|
| MD5 |
39a74dc506ac7a1571eec3e3d18f8747
|
|
| BLAKE2b-256 |
08eb321ee244b483ddfc2887d9e6396949edf5b596be1e070680a9dc4b60a7e4
|
File details
Details for the file pybackup_engine-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pybackup_engine-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7fc08c6eb749de62f0c1c0afc1e420638a723d4e8d91724d821ca74b9864d4
|
|
| MD5 |
94e7fd7c3cc2fc9532d5ad4921166131
|
|
| BLAKE2b-256 |
ccb2d11190bd87de38d8c00eb1f136d7aaee43ed24941ed7be319fb5c6f47330
|