[mythtv-users] MythArchive only sees 10 out of 100s of recordings

Michael T. Dean mtdean at thirdcontact.com
Sat Nov 14 23:57:56 UTC 2009

On 11/14/2009 06:47 PM, stuart wrote:
> Playing w/SQL data queries has uncovered the real culprit. My MBE data 
> base of recordings is missing over 100 recordings.  I can find over 
> 150 recordings all of non-zero length in the appropriate directory.
>> MBE:/space/recordings> ls *.mpg | wc
>>     153     153    3672 
> However a SQL query only finds 11!:
>> mysql> SELECT title, subtitle, starttime, endtime, chanid, basename 
>> FROM recorded WHERE hostname='MBE';
>> +--------------------------------+------------------<stuff deleted>
>> | title                          | subtitle         <stuff deleted>
>> +--------------------------------+------------------<stuff deleted>
> <stuff deleted>
>> | The Office                     | Murder           <stuff deleted>
>> +--------------------------------+------------------<stuff deleted>
>> 11 rows in set (0.00 sec) 
> At this point I'd like to dump the data base and start over.  But it 
> appears to be doing a better job of tracking recordings on the SBE 
> machine.  There the data base has 213 lines.  However, I can only find 
> 162 files.  Ha, the reverse problem!  I can not find 51 files on the SBE.
> Clearly I have issues.
> Given that the MFEs lists the missing files by name and date (I 
> tracked one such file that exists on the MBE but is not in the data 
> base) there must be a way to find the missing data that goes beyond 
> the broken SQL data base. To be clear, the MFEs can not play such 
> shows as they are reported missing.  I'm hoping I can repair the data 
> base and restore the data for over 100 recordings that, apparently, 
> both exist and show up in the MFEs list of recordings but not the SQL 
> data base.
> Any ideas on how to do that? 

Did you move recording files that were recorded on the master backend to 
the remote backend?  If so, the database would need to be updated iff 
the filesystem to which you moved the recording files is not accessible 
from the master backend.

So, if that's the case, you can either mount the remote filesystem using 
NFS or CIFS on the master backend or fix the hostname for the 
appropriate recordings in the database.

You should really do the query above to show a) without any WHERE 
hostname clause, b) with WHERE hostname = 'MBE', c) with WHERE hostname 
= 'SBE', /and/ d) with WHERE hostname NOT IN ('MBE', 'SBE');

Don't give up on your DB just yet.


More information about the mythtv-users mailing list