[mythtv] Database schema checker

ian dobson i.dobson at planet-ian.com
Wed Aug 20 04:29:14 UTC 2008


Hi,

It actually does abit more. I ended up using various backup's from my system 
to rebuild the database (Recordings where OK) and as such I ended up with 
alot of orphaned entries in various tables and rather than manually trying 
to fix them I started writing this script to atleast find out what was wrong 
with recording X.
After I got the system backup and runnng I just continued working on the 
script/adding checks. At the moment the output looks like:-

[--].No command line options defined trying mysql.txt
[--].Try ./CheckMythDB.pl -H for help
[OK].Found 2 video sources
[OK].Videosource (1) analog has a EPG source defined (tv_grab_ch_search)
[OK].Videosource (2) digital has a EPG source defined (eitonly)
[OK].Found 2 card inputs for Videoinput 1
[OK].Found 4 card inputs for Videoinput 2
[--].Checking start channel for each cardinput
[OK].All InputCards are linked to a videosource
[OK].Videosource 1 has 10 channels defined
[OK].Videosource 2 has 35 channels defined
[OK].All channels have a valid videosource
[OK].All dtv_multiplex channels have a valid videosource
[OK].All channel entries have a valid dtv_multiplex
[OK].All dtv_multiplex entries have a valid channel
[OK].Channel ANIXE HD has 211 programs in EPG  and data available for 2.8740 
days
[OK].Channel ARTE has 249 programs in EPG  and data available for 0.0143 
days
[OK].Channel RTL Television has 454 programs in EPG  and data available for 
6.8268 days
[OK].Channel RTL2 has 384 programs in EPG  and data available for 6.8199 
days
[OK].Channel Super RTL has 527 programs in EPG  and data available for 
6.6150 days
[OK].Recording Doctor Who 2008-08-16 18:54:00 has 8204 seek entries
[--].Recording Doctor Who 2008-08-16 18:54:00 Mythcommflag ran but no 
commercials found (commflag still running?)
[!!].Recording The Fast And The Furious 2008-08-16 20:09:00 does not appear 
to have a seeklist
[OK].Recording The Fast And The Furious 2008-08-16 20:09:00 has 8 markup 
entries
[!!].Recording Outland - Planet der Verdammten 2008-08-16 21:54:00 does not 
appear to have a seeklist
[OK].Recording Outland - Planet der Verdammten 2008-08-16 21:54:00 has 10 
markup entries
[OK].File 32434_20080818181400.mpg storage group 'Default' exists in 
database
[OK].File 32434_20080819181400.mpg storage group 'Default' exists in 
database
[OK].File 32437_20080809221400.mpg storage group 'Default' exists in 
database
[--].File 32437_20080819201545.mpg exits in the database but it's in storage 
group 'LiveTV'
[--].File 32437_20080819221004.mpg exits in the database but it's in storage 
group 'LiveTV'


Regards
Ian Dobson

Home of the Atmel based UDP mobile web cam http://www.planet-ian.com
All mails scanned with av-filter.pl (F-Prot / perl)

----- Original Message ----- 
From: "Nick Morrott" <knowledgejunkie at gmail.com>
To: "Development of mythtv" <mythtv-dev at mythtv.org>
Sent: Wednesday, August 20, 2008 4:05 AM
Subject: Re: [mythtv] Database schema checker


On 19/08/2008, ian dobson <i.dobson at planet-ian.com> wrote:
>
>
>
> Hi All,
>
> After spending 2 weekends rebuilding the MythTV SQL database after file
> system corruption, I decided to write a script that checks the data in the
> database against the file system etc.

Is it anything like
http://cvs.mythtv.org/trac/browser/trunk/mythtv/contrib/maintenance/myth.find_orphans.pl
?

The source is the best place to get the various enumerations. However,
they might be documented in the code, in which case they might be
available at http://www.cuymedia.net/mythtv-trunk/)

-- 
Nick Morrott

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin 
Franklin
_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev 



More information about the mythtv-dev mailing list