[mythtv-users] How to clean up database?

Michael T. Dean mtdean at thirdcontact.com
Thu Mar 12 21:48:04 UTC 2009


On 03/12/2009 05:31 PM, R. G. Newbury wrote:
> Jean-Yves Avenard wrote:
>> Well, I don't care much about the size of the database ... More like 
>> I would
>> like to start as if it was a brand new mythtv installation, without 
>> any of
>> the old settings that came from 0.18 and got dragged through.
> Two major space wasters are the credits and people tables. They grow 
> as more programs are recorded. Those tables do not seem to be 
> compressed or  have records deleted.
>
> The program table is reasonably static in size as it just holds 2 
> weeks info. But if you were doing a new install, you could reasonably 
> drop that table, before transferring the backup to the new machine.
>
> If you just want to remove the old settings, then use mysqldump to 
> dump your database, then edit out the table data for the settings 
> table. and restore the database. You can delete the card and source 
> data in mythtv-setup. 

Better is 
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Partial_restore_of_a_backup 
or the one that follows (with plugin data).

Note, however, if you use the one without plugin data, you need to apply 
the patch at http://svn.mythtv.org/trac/ticket/6013 .  (With plugin data 
works with or without the patch.)

Oh, and the one in the HOWTO is also broken.  
http://svn.mythtv.org/trac/ticket/3762#comment:8

Mike


More information about the mythtv-users mailing list