What the server backs up
The server backs up its database every day at 03:00 into <data>/backups/, and once at start when there is none for the day, keeping the last five. A migration to a new version backs it up first.
What you back up
The originals are files in a folder: back that folder up with whatever already backs up the machine (Time Machine on a Mac, for example). The database and the originals together are the whole library, and the key in <data>/tls/ too, if paired phones are to keep working on a restored server.
Restore the database
Restore a snapshot with the filamama command on the server, with the server stopped: it holds the database open while it runs.
# Stop the server first:
# macOS: launchctl bootout gui/$(id -u)/com.diune.media-server
# Linux: systemctl --user stop diune-media-server
filamama restore --list # the snapshots on disk
filamama restore dms-2026-10-19.db # restore that snapshot (a name, or a full path)
# Start the server again:
# macOS: launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.diune.media-server.plist
# Linux: systemctl --user start diune-media-server
Restore checks that the snapshot is a valid database first, keeps a *.pre-restore safety copy of the current database, so a restore can itself be undone, then swaps the snapshot in. Run it with the same settings as the server. Paired phones keep working as long as the key in <data>/tls/ is the same one.