View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Feb 20, 2007 2:23 am 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
[Boring background: weird crash. Myth was running slow so I ssh'd in found mythtv restoring from last backup and reapplying DB upgrades... Last backup was from Aug last year. So now I have a DB from Aug and mpg files from now:
a) most tv files older than Aug are ok - they were in the backup and I still have the video file.
b) some tv files older than Aug are missing the video file (because we watched and deleted them) but have their DB entry brought back from backup.
c) tv files newer than Aug are all screwed - they are not in the DB]

Question:
Is there a script that will sanity check the DB vs TV video files removing any inconsistencies?


So it will check the 'recording' table and delete any recorded programs for which the video file is missing, and delete any tv mpg file for which the DB entry is missing. Also, I've noticed that not all tv jpg files get deleted so I have a few of those hanging around. Be nice if it removed them too.

Does this exist??

Thanks
Paul.

p.s. Sneaky trick for people who have had their DB corrupted and have reinstalled. As you know, there is no way to get the TV database entries back. But look at the tv file - you can tell what the channel, date/time was, and therefore you can find out what the TV program was. Move it to /myth/video and give it a decent name (like "Star Trek.mpg"). Then Setup/Video/Rescan and you can watch them again.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 7:55 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Try the /usr/local/bin/myth.rebuilddatabase.pl script. It won't help with deleted stuff, but it will definitely help with adding back anything in /myth/tv.

Searching for recent posts by me that mention myth.rebuilddatabase.pl should turn up some notes I posted after an experimental version wiped out my recordings table and forced a restore from a 2-3 week old backup. Aha, here it is: http://mysettopbox.tv/phpBB2/viewtopic.php?t=14002&highlight=myth+rebuilddatabase


Top
 Profile  
 
 Post subject: Fixed!
PostPosted: Wed Feb 21, 2007 1:41 pm 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
That did the trick.
Thanks.
Paul.

tjc wrote:
Try the /usr/local/bin/myth.rebuilddatabase.pl script. It won't help with deleted stuff, but it will definitely help with adding back anything in /myth/tv.

Searching for recent posts by me that mention myth.rebuilddatabase.pl should turn up some notes I posted after an experimental version wiped out my recordings table and forced a restore from a 2-3 week old backup. Aha, here it is: http://mysettopbox.tv/phpBB2/viewtopic.php?t=14002&highlight=myth+rebuilddatabase


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu