Preserving Navidrome databases (playlists, etc.) upon update with custom library location

My YunoHost server

Hardware: Old laptop or computer
YunoHost version: * 11.1.6.2 (stable)

Updating navidrome from 0.48.0~ynh2 to 0.49.0~ynh1
Custom library location

Description of my issue

Hi there!

Context: I have yunohost navidrome package installed and due to yunohost update scripts, the config is respawned on update.

This means the service is restarted just after the update and scans the library instantly and those of us with a custom library location lose all the playlists, favorites etc… because navidrome doesn’t preserve information on missing files.

Question: Would it work to make a copy of the database files manually and then restoring them after changing the settings to the custom location after the update?

That’s 0.48.0 to 0.49.0, or are there important database changes that could cause trouble down the line?

Thanks in advance for any tips.

Okey

so answering my own question:

Yes there is at least one database structure change from 0.48 to 0.49 (radio is added)

This would likely created problems later on if I just backup the pre update 0.48 database file with all my playlists and restored it into 0.49.

So what I did was:

During the update after the app is upgraded, but just before the service is restarted, backup the database file located in /var/lib/navidrome/navidrome.db

Wait until the update is completed.
Stop the navidrome service.
Edit the config file and restore the correct library location.
Restore the database from the backup you created
Start the service again.

Boom that worked. Easy see :sweat_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.