NextPVR Forums

Full Version: Shows gone from database after crash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
tl;dr version -- My NextPVR computer lost power and now the database is missing most shows it should have. What's the best way to make sure I've got a healthy database to go on with? (Restoring the missing shows would be nice, but it's not crucial.)



So. Yesterday someone accidentally knocked the power cord for the computer that I'm running NextPVR on out of its socket.

I found out about it about six hours later, and thought I fixed things; when I went to bed a couple of hours later, I thought it was back as it should be. (I can't remember if I checked what recordings it listed; I was very tired at the time.)

In the morning, I checked to make sure the program that should have recorded overnight did... but it didn't. That was when I noticed that the date on the computer was actually set to January 2008! It didn't record the program because it thought the recording date was nine years and four months in the future...

At the same time, I discovered that the database was only reporting 11 recordings, when I have easily six times that many. Thankfully, the actual files appear to all be where they should be, but the database only lists those 11.

I did a little digging in the NPVR data folder, and found the following files:
  • recording-backup.xml -- dated 4/21/2017 5:50 AM -- size 12 KB
  • recording-backup.xml.1 -- dated 1/1/2008 2:16 AM -- size 12 KB
  • recording-backup.xml.2 -- dated 4/20/2017 2:17 AM -- size 160 KB

A quick look in the files suggests that the first two files contain entries only for the 11 files the database reports now, while the last one -- the one that's 160 KB -- seems like it contains all the entries the database should contain.

What's the best way I can make sure the database is "clean", i.e. doesn't contain hidden corruption that'll cause disaster later on? Is there any (relatively easy) way to restore the database's missing entries while I'm at it? I should mention that the listing of my recurring recordings seems to be intact, thankfully.
afeldspar Wrote:What's the best way I can make sure the database is "clean", i.e. doesn't contain hidden corruption that'll cause disaster later on? Is there any (relatively easy) way to restore the database's missing entries while I'm at it? I should mention that the listing of my recurring recordings seems to be intact, thankfully.

The NextPVR database is npvr.db3 in the data folder. Create a copy as a backup.

You can import the recording records into the database at Settings --> Recordings --> Import Recordings and it will ask you which file to import.

It is likely that the database is uncorrupted if NextPVR is now working normally.
Thank you. Sadly, I wish I had realized that the zip of log files which is created by that button on the Settings->About panel does NOT include those recording files -- the recording file I wanted to import doesn't exist now.

Oh well.
Sounds like you need a new motherboard/systemboard battery, not going to fix your recordings but at least the date will be correct in next power cut for whatever reason