Skip to main content

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)

MethodEndpointDescription
GET/api/admin/backup/configGet backup configuration (enabled, schedule, retention, etc.)
PUT/api/admin/backup/configUpdate backup configuration
POST/api/admin/backup/startStart a backup manually (optional body: label)
GET/api/admin/backup/listList backups (query: page, pageSize)
GET/api/admin/backup/{id}Get backup by ID
GET/api/admin/backup/{id}/downloadDownload backup file
POST/api/admin/backup/{id}/restoreRestore from backup
GET/api/admin/backup/statusCurrent backup job status (running, last run, etc.)
GET/api/admin/backup/historyBackup history (runs, success/failure)
GET/api/admin/backup/bucketsList 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.