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

**URL:** https://forum.yunohost.org/t/preserving-navidrome-databases-playlists-etc-upon-update-with-custom-library-location/23587
**Category:** Support apps
**Tags:** french, navidrome, english
**Created:** [February 11, 2023, 1:11pm UTC](https://forum.yunohost.org/t/preserving-navidrome-databases-playlists-etc-upon-update-with-custom-library-location/23587 "2023-02-11T13:11:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![josh](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://forum.yunohost.org/u/josh)
#### Post date: [February 11, 2023, 1:11pm UTC](https://forum.yunohost.org/t/preserving-navidrome-databases-playlists-etc-upon-update-with-custom-library-location/23587/1 "2023-02-11T13:11:24Z")

</div>

### 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.

---

<div class="post-metadata">

### Author: ![josh](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://forum.yunohost.org/u/josh)
#### Post date: [February 17, 2023, 5:44pm UTC](https://forum.yunohost.org/t/preserving-navidrome-databases-playlists-etc-upon-update-with-custom-library-location/23587/2 "2023-02-17T17:44:54Z")

</div>

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 😅

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [March 4, 2023, 5:45pm UTC](https://forum.yunohost.org/t/preserving-navidrome-databases-playlists-etc-upon-update-with-custom-library-location/23587/3 "2023-03-04T17:45:12Z")

</div>

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