navidrome backup

Create, prune, and restore database backups

The backup commands make a copy of the Navidrome database, delete old copies, and restore a copy. Navidrome can also make backups on a schedule. See Automated Backup.

Backups go to the folder in the Backup.Path setting. Each backup file has a name like navidrome_backup_2026.04.01_04.00.00.db, with the date and time it was made.

Usage

navidrome backup <subcommand> [flags]

The alias bkp works too, so navidrome bkp create is the same as navidrome backup create.

All commands also accept the global flags.

Subcommands

SubcommandDescription
createMake a backup of the database now
pruneDelete old backups and keep the newest ones
restoreReplace the database with a backup

backup create

Makes a backup of the database. This command doesn’t delete old backups, even when you have more than Backup.Count. Run backup prune for that.

navidrome backup create [-d <folder>]

Flags

FlagDefaultDescription
-d, --backup-dirBackup.PathFolder to write the backup to

Examples

# Back up to the folder in Backup.Path
navidrome backup create

# Back up to another folder
navidrome backup create --backup-dir /mnt/backups/navidrome

backup prune

Deletes old backups and keeps the newest ones. It only looks at files named like navidrome_backup_<date>_<time>.db, and leaves other files in the folder alone.

navidrome backup prune [-d <folder>] [-k <count>] [-f]

By default, prune keeps as many backups as Backup.Count. If the number to keep is 0, prune deletes every backup. It asks you to type YES first, unless you pass --force.

Flags

FlagDefaultDescription
-d, --backup-dirBackup.PathFolder with the backups
-k, --keep-countBackup.CountNumber of backups to keep. 0 deletes all backups
-f, --forcefalseDon’t ask for confirmation when you delete all backups

Examples

# Keep the number of backups set in Backup.Count
navidrome backup prune

# Keep only the newest 7 backups
navidrome backup prune --keep-count 7

# Delete all backups without a prompt
navidrome backup prune --keep-count 0 --force

backup restore

Replaces the current database with a backup. It asks you to type YES first, unless you pass --force.

navidrome backup restore --backup-file <file> [-f]

If --backup-file is a file name or a relative path, the command looks for it in the Backup.Path folder. An absolute path works from anywhere.

Flags

FlagDefaultDescription
-b, --backup-fileBackup file to restore. Required
-f, --forcefalseSkip the confirmation prompt

Examples

# Restore a backup from the Backup.Path folder
navidrome backup restore --backup-file navidrome_backup_2026.04.01_04.00.00.db

# Restore a backup from another folder
navidrome backup restore --backup-file /mnt/backups/navidrome/navidrome_backup_2026.04.01_04.00.00.db

# With Docker Compose, stop the server first
docker compose stop navidrome
docker compose run --rm navidrome backup restore --backup-file navidrome_backup_2026.04.01_04.00.00.db
docker compose start navidrome