LinHES Forums http://forums.linhes.org/ |
|
Remove missing recordings from Database http://forums.linhes.org/viewtopic.php?f=6&t=18955 |
Page 1 of 1 |
Author: | kmkittre [ Mon Sep 15, 2008 8:00 pm ] |
Post subject: | Remove missing recordings from Database |
Okay, here's my problem: I lost one of the drives in my LVM. I've tried rebuilding the LVM with another drive, I've tried replacing the controller card on the failed drive, and I've banged my head against the table for hours on end, none of these things have fixed my problem. I've finally decided to give up on recovering my 1.1TB of DVDs and recordings and move on the restoring my MythTV system to fully functioning order. The nice thing is that my database is intact. However, the database is referencing lots of recordings that no longer exist. Is there some easy script/query I can run on the database that tells it to pretend as if the recordings with no corresponding file have been deleted? While I was waiting for the replacement hard drive to try swapping out the controller card I kept using the system with a temporary /myth drive so I have new recordings I'd like to keep in the DB. Any help is appreciated, and I apologize if I am rehashing something, my searches came up fruitless. If there is another thread/wiki article covering this issue feel free to just point me in that direction. Thanks! |
Author: | kmkittre [ Tue Sep 16, 2008 7:09 am ] |
Post subject: | |
I have been looking through the database and it looks like I need to transfer the records from 'recorded' to 'oldrecorded'. However, of course, it isn't straightforward. There are a few elements in 'oldrecorded' that are not in 'recorded', so I can't do a straight query->insert->delete. Or, maybe I can if I know what other table(s) to cross-query... Anyway, the different elements are: 'station', 'rectype', 'recstatus', 'reactivate', and 'generic'. Station is easy enough to find, and I'm assuming that 'reactivate' is a flag set when you delete a recording and tell it to re-record, but I don't know where the rest come from... |
Author: | tjc [ Tue Sep 16, 2008 5:46 pm ] |
Post subject: | |
I suspect you're misunderstanding what's involved. There is actually a tool around to cleanup orphaned recording records like this, but I don't recall the name. Try search for orphan and pretty... Even better take a look at /usr/local/bin/myth.find_orphans.pl I'm not sure it's a 100% solution but searching on it's name should get you more info. |
Author: | kmkittre [ Tue Sep 16, 2008 8:24 pm ] |
Post subject: | |
Quote: I suspect you're misunderstanding what's involved.
Not a bad suspicion ![]() Thanks for the lead, I'll follow it and follow up here with my results in case someone else finds this thread looking for answers. |
Author: | jmckeown2 [ Wed Sep 17, 2008 4:59 am ] |
Post subject: | |
Depending on how many recordings you've lost, you can replace each recording with an empty file using "touch" at the commandline. You can then delete these bogus recordings through the front-end. And select "allow re-record" or not as you like. Since you mention LVM, it may be you lost more than is practical with this method. I think oldrecorded is where myth tracks previously recorded so that it won't re-record shows you've already had. If you select "Delete, but allow it to re-record" then oldrecorded does not get a new record. ?? |
Author: | tophee [ Wed Sep 17, 2008 6:15 am ] |
Post subject: | |
Hi Jim, Your solution sounds like a good one, what would the command be to do this? I've one recording that pertains to be empty (the news for some reason) and I can't delete it. Regards Chris |
Author: | cliffsjunk [ Mon Sep 22, 2008 9:44 pm ] |
Post subject: | |
I recall that I have had missing recordings too at one time and that it did let me delete them with some warning or other. It sounds like something else may be wrong. On the other hand, if you have a keyboard, it would probably only take a half hour to delete those old recordings that are missing. No more than a few seconds per entry I would think. |
Author: | tophee [ Tue Sep 23, 2008 1:52 am ] |
Post subject: | |
Yesterday, I could delete the missing file. Don't know what changed, but I could. |
Author: | kmkittre [ Sat Sep 27, 2008 1:28 pm ] |
Post subject: | |
<removed, I was wrong...> |
Author: | kmkittre [ Sat Sep 27, 2008 1:46 pm ] |
Post subject: | |
I just ended up doing it manually. I copied all the link locations of the videos from the "Recorded Programs" page on MythWeb and then touched all the filenames and then deleted them using MythWeb. It was only 66 recordings, so it didn't take too long... |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |