[mythtv-users] Dumping database and starting over?

Rickard Olsson richie at webhackande.se
Mon Mar 28 12:25:02 UTC 2005


Chad wrote:

> I'm having problems with my database right now, and am considering
> just dumping to an sql and starting over.  I'm wondering how
> successful I'll be if I try to dump the sql back to mysql and see my
> programs again.  Obviously I won't delete the files themselves, but
> I'm wondering if the db will see them afterwards?  What if I don't
> dump it back to mysql?

I did a variant of this last night. Your options are to export the files 
with nuvexport (option 10 - export to nuv and sql) or use another 
program (I used Webmins MySQL module) to export the relevant tables 
(programming info seems to be in the recorded, oldrecorded and 
recordedmarkup tables).

Then, you simply import the tables using whatever tool you used to 
export them (well, expect nuvexport).

If you do not backup the tables, myth will not see the files. All the 
episode data is in the database. It is possible to use the 
mythrebuild.pl script (it's in the contrib folder of the mythtv 
distribution) to create new database entries for the files, but then 
you'll have to enter all the info by hand. Backup the database already. :-)

In my case, I saved the channels and card tables and re-generated the 
rest from scratch and then re-imported the saved channels. This fixed my 
problem with not being able to list recorded shows in mythfrontend and 
mythweb. YMMV.

Depending on your specific database problems, you may also want to look 
at the various ways to repair broken mysql databases:

http://www.databasejournal.com/features/mysql/article.php/3300511

     / Rickard Olsson,IT-Konsult/
    / Telefon: +46 70 635 01 42/
   / http://www.webhackande.se/


More information about the mythtv-users mailing list