Roon unable to recognize database backups due to possible corruption (ref#TYHL2L)

Hi! What’s not quite right with Roon?

· None of the above quite fits

None of the above quite fits

· None of these quite match

Tell us what's going on

· Possibly corrupt database - Roon does not recognize backups

Tell us about your home network

· ROCK on ASUS NUC; files on QNAP NAS

I have been using Roon for almost 8 years, with the files stored on a QNAP NAS and the ROCK installed on a NUC (initially Intel, ASUS since this March).

On September 5 we lost Internet for roughly 24 hours, as the cable system had been damaged in a storm a few days earlier. On that evening, I was able to use Roon without an Internet connection but was unable to do so the following day. After Internet service was restored, I powered up the ROCK and everything worked fine. The next morning, I received a “There was an issue loading your library” message, but I performed a hard reboot of the ROCK, and everything worked fine.

After doing this daily, on September 10 I also received a “The new version of Roon you installed requires a database update” message; after performing the update everything loaded and continued to work fine.

On September 12, I realized that if I had to reboot ROCK every morning, maybe there was a problem with the backups. I checked and Roon said the backup had failed, with the last good backup the one just before the Internet went down.

The ROCK backs up to the NAS, and I can see the backups in file manager on the NAS, with the most recent files being backed up dated September 5, the morning before losing Internet. However, when I try to restore this backup, it only finds a version from March that I used when I set up the new ASUS NUC.

I tried copying the files to a flash drive and plugging it into the NUC, but Roon still failed to recognize them as valid backup files.

What can I do at this point? Thanks in advance.

Hello @Mark_Schumacher

We pulled the logs from your ROCK. Your read on this was right: the database is damaged.

That is also what has been happening to your backups. Roon checks the database before it writes a backup, and on your system that check fails, so the run stops before any files are written. It has gone that way on every attempt since September 5. The September files you can see on the NAS are what those stopped runs left behind, which is why Roon does not offer them as a restore point. The March backup is the last complete one.

Two things you can set aside. Your drive is healthy, with no disk errors anywhere in the logs, so there is nothing to replace. And your music on the QNAP is untouched.

On the cause: the logs show the ROCK being powered off before it had finished writing to disk. The daily hard reboots were a reasonable thing to try, and nothing told you they carried a risk, but each one could leave a half-written record behind.

The way forward is restoring the March backup, and we know that is not what you were hoping to hear. Your files are all still on the NAS, so the library rebuilds from them. What will not come back is anything you edited, tagged or played since March:

After that, please shut the ROCK down from its web interface rather than cutting power:

Once it is back, please check Settings > Backups and confirm the next backup completes. If it does not, let us know.

Vadim

Thanks for the prompt response. I correct tagging issues in the Roon database (rather than editing the actual files), so this will be a major hassle.

However, I think there was (and still is) an issue with the backups.

Two days ago, I restored the March 10 database with no problems. Roon identified the files that had been added subsequently. Just to be safe, I immediately did a manual backup. I didn’t try to edit the database that day, as I wanted to make sure the scheduled backup worked correctly. Yesterday morning I checked the Scheduled backups, and it stated that there had been a successful backup overnight. I spent much of yesterday editing the database. I observed some strange behavior with image files (which I will describe in a subsequent note), but otherwise everything seemed to be coming along fine.

This morning I checked again, and it showed a successful backup at 2:04am. However, the backup summary screen said the last successful backup was my manual version from two days earlier. If I try to restore a backup, Roon only finds the March 10 backup and the manual backup from two days ago. However, there is clearly a backup from this morning on the NAS.

I did another manual backup this morning, and it is also available to restore. It seems that the scheduled backups created by Roon cannot be restored for some reason. If the scheduled backs done previously had been able to be restored, I would not have lost 6 months of effort when my database had problems last week.

Thanks again…

Any ideas - thanks

One additional bit of info. For some reason last night Roon Rock had a problem, so when I tried to use Roon the morning I received the “There was an issue loading your library” message. This time I was able get ROCK restarted via the web interface. The scheduled backups screen showed that the backup failed, stating the the last successful backup was on Sept 19. However, backup manager shows the most recent backup to my NAS to have been on Sept 15 (which is correct, assuming that Roon is always unable to perform scheduled backups).

I suspect that the last successful scheduled backup was in early March, when my ROCK was installed on my old Intel NUC. It appears that all of the scheduled backups have failed sinse I migrated to the ASUS ROCK.

Same behavior last night as the previous night - I think it is the scheduled backup that causes the problem…

Hi @Mark_Schumacher,

Thank you for your patience awaiting a response here.

The latest logs show corruption events occurring on September 21 and again today, well outside of scheduled or manual Backup windows. The most likely possibility is that this database was experiencing latent, creeping corruption some time ago (back before March), and even healthy restores are eventually corrupting during background indexing.

Roon’s corruption detection is robust, and it checksums the entire database to look for unexpected changes. Something on this database keeps getting changed. There are two paths forward here to pin down the cause.

First, we can test the physical realm by trying to determine what’s happening overnight that puts pressure on the system. This would involve some granular tinkering with your Settings → Library page to put maximum and minimum resource pressure on background work and backups, and then inspecting logs.

The second option is to test with a fresh database. This would involve:

  1. Restoring your March 10 backup.
  2. Right away, making a manual backup to a new, empty folder on your NAS.
  3. Setting up a fresh database and letting Roon import your music from the NAS.
  4. Using the fresh database normally for a few days while we gather logs.

How would you prefer to proceed? We’ll walk you through either way.

Thank you and we’ll watch for your reply.

Connor

Thanks for the help. I was using Roon this morning when it crashed, which was the first time it happened other than overnight.

For more context:

I have been using Roon for 8 years – the music has always been on a QNAP NAS, and the database has always been on ROCK. Other than some occasional quirks everything worked fine. I always had a scheduled backup to a USB drive. As I frequently edit many of the files in the database, I would at times reload a previous day’s backup if I thought I had screwed something up.

As my database got bigger, Roon gradually seemed to slow down (when editing or searching – playback was always perfect). I purchased an ASUS NUC and bought a new disk and memory. I installed ROCK and tried to load the backup. This failed, presumably because the backup file was 40GB and there was only 77GB free on the USB drive. (Can you confirm this was inadequate free space?)

I did a manual backup to the NAS and was able to install this on the new ROCK. I continued to have Roon perform an incremental backup every day. However, none of these are usable.

When Roon has been working over the past few weeks I have noticed bizarre behavior with album art. On perhaps 1% of the new additions, the album art shows up correctly on the main page, but when I click on the album it brings up a random album cover (images below). This goes away once I open any other album. One two occasions the main page shows a random cover, but the album page is correct. I can only fix this by downloading a new jpg of the cover.

The following may be totally irrelevant. On September 3 there was a severe storm here, with three tornados. We never lost power or had any power fluctuations. Two days later we lost Internet for 24 hours, as Comcast needed to perform repairs. (Other than the issue with the incremental backups) the problems with Roon surfaced right after Internet was restored. Over the subsequent days I noticed that our Wi-Fi speeds were much lower and many devices were not easily getting IP addresses. Bandwidth to the router and my computer (hard wired with a fixed IP address) are unchanged, but I think something happened to the router during this period. I purchased a new router and plan to set it up over the weekend. The ROCK and NAS also are hardwired with fixed addresses, but I wonder that if the router is damaged, might this be the cause of the problem with Roon?

I will happily do whatever you recommend.

Thanks in advance…

Mark

I was planning to not do anything after Roon crashed on Friday. However, I decided I wanted to listen to music on Saturday, so I loaded the backup from Sept 15 and turned off automatic backups. Roon worked fine on Saturdays and Sunday, but when I woke up this morning it had crashed sometime overnight. Thanks for your help - I look forward to getting this resolved.

Hi @Mark_Schumacher

We pulled fresh logs from the ROCK this morning, and the picture has changed.

There is no corruption in them. This morning’s database check ran clean and took 39 seconds, and the scheduled backup that followed at 06:00 completed and wrote its files.

What we can see is why your scheduled backups have not been showing up. You have two backup folders on the NAS:

  • Your manual backups go to \music-server\home\Roon\RoonBackups
  • The scheduled backup writes to \music-server\home\Roon

Those are different locations, and the restore screen only lists backups from the folder you point it at. When you browse to RoonBackups, this morning’s scheduled backup is not there, because it went to the folder above it. The backup ran, it just landed somewhere you were not looking.

Please check this: go to Settings > Backups. You should see more than one scheduled backup location listed. If so, please send us a screenshot of that page.

Two other things from the logs:

Automatic backups are switched back on. That is not something going wrong: restoring your 15 September database also restored the backup settings as they were on 15 September, and the schedule came back with them.

Vadim & Connor

Thanks for all the help. When Vadim asked me to check the September 30 backup, Roon failed to find it. It struck me that the backup might not be seen by Roon if it was corrupted. I had a USB drive in the back of my ROCK, but Roon did not show that it contained any backups. As a result, I ignored this drive when looking for backups. Yesterday I put the drive in my computer, and Windows identified that it contained errors. After Windows repaired the errors, I put the drive back into the ROCK and Roon found 20 incremental backups, with the most recent dated September 5, the morning before my database became corrupted. I restored the backup and everything seems to be perfect. Roon backed up last night normally, implying that my database and any/all new backups are not corrupted. I assume this makes sense to you. If you can verify that you do not see any corruption, I would appreciate it. Thanks for all your efforts on this issue – Roon is a great product that can be a bit fiddly, and this type of hands-on assistance is a valuable service.

Vadin & Connor

Well, it appears that I spoke too soon. I thought everything was back to normal, but Roon just crashed. I will leave it alone until I get further instruction from you. Thanks in advance & sorry for the hassle…

Mark

Hello @Mark_Schumacher ,

I suspect there may have been some remenant let over from the previous database. Can you please try to reset the Roon Database + Settings in the RoonOS WebUI and restore from a backup?

Please, let us know how that procedure goes.

Noris

Thanks for the help - resetting the database seemed like the perfect solution. I was able to listen to music after resetting and loading the backup. Yesterday I decided to edit recent additions and add missing artist photos. Everything seemed to go well, although I still had two instances of Roon showing random artist photos instead of the album covers (eg - the 2 albums at the right of the 1st row). Unfortunately, when I got up this morning the system had crashed again.

FYI - I power cycled ROCK yesterday and it’s working again. Still hope there is some tweak than can get Roon functioning as it was one month ago…