LinHES Forums
http://forum.linhes.org/

Crash means orphaened recordings
http://forum.linhes.org/viewtopic.php?f=6&t=9299
Page 1 of 1

Author:  tophee [ Mon Mar 27, 2006 4:20 am ]
Post subject:  Crash means orphaened recordings

Hi everyone ... small problem. I want to recreate/rebuild the Myth db to it's former glory.

Search:
database crash
db crash
recovering db
rebuilding db
recreating lost db

Useful Results:

http://mysettopbox.tv/phpBB2/viewtopic. ... recovering

http://www.knoppmythwiki.org/index.php? ... storeHowTo

Yesterday MythTV crashed. Myth reported not being able to connect to the backend.

I rebooted and the GUI wouldn't start. So in desperation, (it had been a heavy weekend climbing mountains and drinking far too much and the GF was beginning to worry about missing 'Planet Earth'), I reinstalled Myth using auto upgrade on version R5A30.2

I ended up with recovering an old out of datedb which menas lots of orphaned recordings. Boo. :(

Now, will the command:

Code:
myth.rebuilddatabase.pl --dbhost=localhost


work out of the box? Will it find everything automatically? And does this command recreate the enteries in the data base so the next episode is automatically recorded as previous? Or do I have to set the recording options automatically?

Perhaps I'm being over cautious and I should just try this command but I'd like to check before I make things far worse. :?

Thanks

Author:  nbdwt73 [ Mon Mar 27, 2006 6:18 am ]
Post subject: 

That script will find the orphaned recordings but will require you to enter the identities (name or some identifier that will show up in "recordings") It will not recover your "to be recorded" settings - you will have to reset those manually.

When you run the script, it will indentify the files by a date and time stamp so, if you wanted to, you could research each one to determine the show identity. Or you could just enter a unique name (show 1, show 2 , etc...) so that something will show up in the recordings screen that can be selected and played...

Author:  tophee [ Tue Mar 28, 2006 2:07 am ]
Post subject: 

thanks for that. worked like a charm

Author:  thornsoft [ Tue Mar 28, 2006 10:32 am ]
Post subject:  Re: Crash means orphaened recordings

tophee wrote:
Yesterday MythTV crashed. Myth reported not being able to connect to the backend.


I had this last week, and was able to work around it.
Maybe same situation, maybe not, but here goes:

I re-started the backend, and brought up the listing of recorded shows using mythweb. It got partway through, then showed "can't connect" messages. But I could tell where it was having trouble. It was choking on one of the recordings. Wouldn't display its thumbnail pic.
So I went into the database using PHPMyAdmin, browsed the "recordings" table, and deleted the offending record. Then I went into \myth\tv via SSH and deleted the corresponding file (don't remember if it was .nuv or .mpg) and then deleted the corresponding on in the "pretty" directory too.
Re-started the backend again, and all was well.

Then it happened AGAIN! I've since gone back to the 7676 nVidia drivers.....
This time, I did the same thing, but when I came back into the listing of programs, there were only 6 shows! Yikes! I thought about ways to re-build the database from the files (the files were there in \myth\tv).
Then I realized that the shows DID show up in mythweb. So the front-end was being filtered somehow. Ah - it had crashed on my wife, and she had gone into the program listing, and probably pressed ENTER on the dialog that comes up when it can't find anything. It comes up with a filter dialog, and she'd somehow set it to display only "drama". Mystery solved.

Author:  cesman [ Tue Mar 28, 2006 9:37 pm ]
Post subject: 

My hard drive crashed and I had to fsck the drive. Unfortunately, this left me with only lost+found. Great the system wouldn't boot, I have a ton of recordings and I'm getting ready to go on a trip. What to do, what to do? Well, I booted off an R5A22 CD I had handy and mounted the drive.
Code:
mount -o rw /dev/hda1 /mnt/hda1
ls -al /mnt/hda1/lost+found/*/*/* > out
The only thing I wanted to try and recover was the db, I knew if I could do that, I'd be ok. Knowing db was in /var/lib/mysql/mythconverg, I looked for mysql and a mythtv just below it in out. This told me where the directory would be. Having found which #ABCXYZ directory housed the db, I cd to it and found everything intact. I scp all those files over to my workstation. I then did a auto upgrade. After that process, I scp'd the files back and
Code:
chown mysql.mysql /var/lib/mysql/mythconverg/*
/etc/init.d/mysql restart
/etc/init.d/mythbackend restart
I was back in business!

Author:  tmryan [ Thu May 18, 2006 10:14 am ]
Post subject: 

nbdwt73 wrote:
myth.rebuilddatabase.pl

That script will find the orphaned recordings but will require you to enter the identities (name or some identifier that will show up in "recordings") It will not recover your "to be recorded" settings - you will have to reset those manually.

When you run the script, it will indentify the files by a date and time stamp so, if you wanted to, you could research each one to determine the show identity. Or you could just enter a unique name (show 1, show 2 , etc...) so that something will show up in the recordings screen that can be selected and played...


By "orphaned recordings", I assume you guys mean .nuv files in the myth/tv directory that is not showing up in the myth database; and running the myth.rebuilddatabase.pl will enable you to put the entries into it.

However, does this script also work in the other direction? That is, delete entries from the database when the corresponding .nuv file no longer exists in myth/tv directory?

Thanks.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/