Linux Install: Recommend not mounting <library_path> directly#135
Conversation
Protect users from data loss if <library_path> unmounted and Navidrome scans the library by recommending to store <library_path> in a subdirectory of the mount point. Navidrome deletes all songs from the database if <library_path> exists but is an empty mount point, permanently deleting playlist contents, favourites and play counts. If <library_path> does not exist, the scan simply fails and the database is not modified.
|
This was already fixed in Navidrome in newer versions and should not be an issue anymore: navidrome/navidrome#893 Are you still experiencing this? |
|
@deluan Hi, thanks for responding. Yes, I had some time today so I set up a test container with the latest release 51.0 to get to the bottom of this, and can confirm that this is still happening, but it's not a bug: Why this happensI had a look at the changes in the issue you linked: navidrome/navidrome#893 At line 83 in This makes a lot of sense. If I remove all the content from my library and click "full scan", I would expect Navidrome to remove all the songs, and not abort the scan. How this can quickly lead to data lossKnowing this, this is how I lost my database:
I had a good backup and it was no big deal, but it could be for others. My suggestion to prevent this happening accidentallyIn This provides full protection from accidentally starting a full scan on an unmounted library. I see no point in allowing Navidrome to start when the library is unavailable, so as far as I can tell there is no downside. Maybe something like this could be added in the installation instructions as a commented out section in the systemd unit? |
|
I think it makes sense. Can you please open a PR to change the script? Thanks! |
Protect users from data loss if the storage backing
<library_path>is unmounted and Navidrome scans the library by recommending to store<library_path>in a subdirectory of the mount point instead of mounting it directly.Navidrome deletes all songs from the database if
<library_path>exists but is an empty mount point, permanently deleting playlist contents, favourites and play counts. If<library_path>does not exist, the scan simply fails and the database is not modified.