I posted thit tip in another thread, but I tought it should belong here.
Sometimes, especially when you upgrade or tweak subsonic, you can break the database.
Before upgrading, always backup your subsonic folder.
If the database breaks, you can recover some settings :
Users (with their password) and their settings:
They are kept in the subsonic.script file. (steps 1 to 3 are only needed if you didn't remove the subsonic folder before reinstalling)
1. stop subsonic service
2. rename the subsonic/db directory
3. start subsonic service : a new database is created.
4. open the old subsonic.script file (in the directory you renamed)
5. select the lines you want to keep (INSERT INTO MUSIC_FOLDER VALUES... INSERT INTO USER VALUES... INSERT INTO USER_ROLE VALUES ... INSERT INTO USER_SETTINGS VALUES ...)
6. in your subsonic webpage, replace "index.view" with "db.view"
7. paste the selected lines
Now you should have your old user settings
Starred songs or albums :
You can't import the starred albums or songs from subsonic.script, because when you recreate the database, each song will have a new ID !!!
If you want to backup these BEFORE upgrading, there is a workaround :
- create a playlist with all your starred songs
- export the playlist
When you have to recreate the database, you will just have to import this playlist and star each song.
Same thing for the starred albums : you create a separate playlist, and put one song of each album, then star the album !
Playlists :
Old playlists (up to 4.6) are stored in a folder, so there's no problem to recover them.
New playlists (since 4.7beta1) are stored in the database. If you want to keep them just in case, you have to export them.
If you have some more tips for other settings, don't hesitate to add them !