[mythtv-users] Cleanup script

Michael T. Dean mtdean at thirdcontact.com
Wed Oct 11 05:02:37 UTC 2006


On 10/10/06 21:57, Leighton Brough wrote:

>Michael T. Dean wrote:
>  
>
>>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.
>>
>Is there a easy way to find files which _do_ exist, but don't have 
>corresponding entries in the database? In this case they'll be wasting 
>storage, and will never be expired.
>

myth.rebuilddatabase.pl /and/ the script on the ticket at the link you 
cut from my reply...

Mike


More information about the mythtv-users mailing list