Backup (Admin)
Bellamy Book includes an admin backup feature: create backups of application data (e.g. PostgreSQL, Neo4j, MongoDB, Redis, MinIO), list and download backups, restore from a backup, and configure a scheduled backup (Quartz job). Backup configuration and operations are available only in the Admin Panel and require Admin role.
Overview
- Admin Panel: Backup — list backups, configure schedule, start backup, download, restore. Routes:
/backup(list),/backup/config(configuration),/backup/restore(restore). - API:
api/admin/backup— config (GET/PUT), start (POST), list (GET), get by ID, download, restore (POST), status (GET), history (GET), buckets (GET). - Scheduled job: ScheduledBackupJob (Quartz) runs on a cron (default daily at 2 AM). Schedule is configurable in Admin → Backup → Config or via
Quartz:ScheduledBackupJob/Backup:Schedule. See Scheduled Jobs.
API Endpoints (api/admin/backup)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/backup/config | Get backup configuration (enabled, schedule, retention, etc.) |
| PUT | /api/admin/backup/config | Update backup configuration |
| POST | /api/admin/backup/start | Start a backup manually (optional body: label) |
| GET | /api/admin/backup/list | List backups (query: page, pageSize) |
| GET | /api/admin/backup/{id} | Get backup by ID |
| GET | /api/admin/backup/{id}/download | Download backup file |
| POST | /api/admin/backup/{id}/restore | Restore from backup |
| GET | /api/admin/backup/status | Current backup job status (running, last run, etc.) |
| GET | /api/admin/backup/history | Backup history (runs, success/failure) |
| GET | /api/admin/backup/buckets | List storage buckets (e.g. MinIO) used for backup |
Configuration
- Backup can be enabled/disabled and scheduled (cron) from Admin → Backup → Configuration.
- When the schedule is saved, the API reschedules the ScheduledBackupJob Quartz trigger so the next run uses the new cron.
- Backup retention and storage paths are typically configured in app settings or backup config; see your deployment or Self-host — Backups for operational backup strategy and retention.
Related
- Admin Panel — Backup section
- Scheduled Jobs — ScheduledBackupJob
- Self-host — Backups — Operational backup and retention