[mythtv-users] Cleanup script

Michael T. Dean mtdean at thirdcontact.com
Tue Oct 10 18:41:46 UTC 2006


On 10/10/06 14:15, George Nassas wrote:

>On 9-Oct-06, at 9:23 PM, Monkey Pet wrote:
>
>>I was wondering if their is a script to do the  
>>following: compare NUV files with entries in the db and make sure  
>>it exists on both ends (files and db).  If they don't, take the  
>>proper action.  I want to accomplish two things.  Free up space by  
>>getting rid of rouge files.  Also cleanup the db, so I don't have  
>>to manually delete a bunch of entries using the frontend.  Anyways  
>>if this doesn't exist, I will just write it myself.
>>    
>>
>The other half - removing db rows for entries that have no matching  
>files is trickier. You can't know if a file is truly missing or if  
>it's on remote storage and temporarily unavailable.
>
But, assuming you have no remote storage (or you know it's accessible), 
you can just scroll through the list of recordings in Watch Recordings 
(with the live preview enabled) and if you get just blackness, it's 
probably non-existent.  Or, you can tail -f the mythfrontend log while 
you're scrolling and when you see the error about a non-existent file, 
you know you need to delete it.

> On the other  
>hand, it'd be nice to have a script that did consistency things like  
>verifying that everything in the recordedmarkup table actually has a  
>matching row in the recorded table and cleaning out the orphans. That  
>would be a good addition to optimize_mythdb.pl which is looking  
>pretty skimpy at the moment.
>
I don't think it belongs in optimize_mythdb.pl (perhaps in a much-needed 
complete overhaul of myth.rebuilddatabase.pl).  Anyway  
http://svn.mythtv.org/trac/ticket/2363

Mike



More information about the mythtv-users mailing list