Upgrade Deleted Everything

I upgraded my unRAID release to v2.0.0.2301 today using the button found in the System Tab. I restarted sonarr from the unRAID GUI and found that everything was gone. All my settings, my shows, calendar, everything.

I’m assuming that there is no way to get it back without a backup (which I don’t have).

Why would this happen? Is this behavior normal?

Are you running it in a docker image? If so which one?

A update definitely won’t wipe out any settings, I suspect the docker image may be making use of an unsupported feature which causes the update to not know where the database is post-update.

If you’re running docker can you restart the image?

I honestly don’t know what a docker image is, so I doubt I’m running one. :smiley:

How did you setup Sonarr? UnRAID plugin?

Is there a plugin manager? Can you restart via that?

Correct. It was a plugin that I downloaded from the unRAID forums. Immediately after the download it wouldn’t load any of the settings menus. I just got the moving dots that you get when it’s loading. I was able to access the Series listing at that time.

I loaded the unRAID GUI and went to the settings and saw that sonarr was listed as Stopped. So it hit the Start button. It started but that’s apparently when everything was deleted.

The series list is stored in the client and updated when a few different pages are visited, but wouldn’t clear if the query to the server failed because it was down.

If you go to system -> info in Sonarr’s UI, what are the AppData directory & Startup directory paths set to?

Here is what it says:

AppData directory
/.config/NzbDrone

Startup directory
/mnt/cache/apps/nzbdrone

I just went ahead and re-added all the old shows and set it up again. The only issue I have now is that it shows 16 downloads in the queue. But there isn’t anything downloading nor should there be anything in the queue.

The paths don’t conflict, I was worried the config Dir was a sub folder of the start up directory, which explain the data loss.

I’d double check that there isn’t another nzbdrone.db in another location on your system, due to it being pointed somewhere else.

As for the queue: https://github.com/Sonarr/Sonarr/wiki/FAQ#why-is-there-a-number-above-activity

Ah. Thanks for the link. Purging SABnzbd’s history cleared up the queue issue.

Son of a bitch. It happened again. Because of the API issues I used the upgrade button in the GUI. Now all my settings and shows are gone.

I fixed it by restoring a backup that I manually made and copied off the cache drive. I saw prior to the upgrade process that it was making a backup, unfortunately, that got wiped along with everything else. Thankfully after the last incident, I manually made a backup and copied it off the server.

I’m guessing this has something to do with me running the program on an unRAID server?

It has to do with the folder structure. During an upgrade Sonarr deleted the contents of its application directory (removes any files that are not part of the new release), then copies over the new files.

The only way the application data is deleted is if its in the same folder or a child of that folder.

Is /.config/NzbDrone symlinked somewhere?

What files would I find in that directory? I have an AppData folder which is where the database appears to be.

There is a /mnt/flash/config/plugins/nzbdrone folder that is in a different location than the installation directory /mnt/cache/nzbdrone

Sonarr’s AppData folder contains nzbdrone.db, the logs and some other files (including its own backups).

The Startup Directory contains the executable and all the other components for operation (DLLs, UI, etc), if it contains a subfolder with the AppData it would get deleted on upgrades, because its not a supported structure (I don’t know how the unRAID plugin has its folders setup).