Navidrome Database Backup
This role backs up the Navidrome SQLite database to dual NAS storage with a clean container stop/restart.
Overview
This role backs up the Navidrome SQLite database to dual NAS storage. It schedules a Centreon downtime, stops the Navidrome container to guarantee a clean snapshot, copies the database to both NAS locations with a timestamped filename, then restarts the container. The role automatically manages retention by keeping only the last 5 backups per NAS.
What This Role Does
- Schedules a Centreon downtime to prevent false alerts during the backup
- Stops the Navidrome container to ensure a consistent database snapshot
- Copies the database to both NAS locations with a timestamped filename
- Restarts the Navidrome container
- Removes old backups, keeping only the 5 most recent per NAS
Role Variables
| Variable | Description |
|---|---|
centreon_host_name | Host name as it appears in Centreon |
navidrome_db_backup_syno_mount_point | Synology NAS backup destination |
navidrome_db_backup_prxmxomv_mount_point | Proxmox OMV NAS backup destination |
navidrome_db_backup_downtime_duration_minutes | Centreon downtime window duration |
Notes
- Only the Navidrome container is stopped. All other Docker services keep running
- If the database copy fails, the container is restarted immediately rather than left stopped
- Centreon downtime failures don’t block the backup. It proceeds even if Centreon is unreachable
- Keeps last 5 backups per NAS; older files are automatically deleted