The problem
MongoDB backups ran from ad-hoc cron with no monitoring, no off-site copy, and no easy restore, so failures went unnoticed until data was needed.
The approach
Built a backup service that runs scheduled dumps, compresses them, replicates off-site with rclone, records every run, and exposes a dashboard for monitoring and dynamic configuration without restarts.
Architecture
Node.js, Express, and TypeScript service with Prisma over SQLite for backup metadata and settings, node-cron scheduling, bash scripts for dump and compression, rclone for cloud sync to Nextcloud, Nodemailer for SMTP alerts, and Winston logging. Next.js dashboard with Recharts.
Key features
- Scheduled MongoDB dumps with tar.gz compression
- Off-site sync to Nextcloud or any rclone target
- Dynamic connection, database, and location config from the dashboard, no restart
- Email alerts on backup or sync failure
- Disk usage analytics and storage snapshots
- Retention and auto-cleanup, plus one-click restore from any record
Tech stack
The result
Backups now run on a schedule with off-site copies, failures trigger immediate email alerts, and any snapshot restores in one click.