[mythtv-users] restore borked db

pmb junk at umich2.com
Fri Mar 11 05:08:02 UTC 2005


cythraul wrote:

>This demonstrates again the need for some kind of easy-to-use backup
>and recovery tool for myth.
>
>To answer your question, the "record" and "recorded" tables are what you want.
>
>Of course, it depends on how proficient with sql but it's fearly easy.
>
>PLEASE backup your db before doing anything, I might be wrong, flat
>wrong or completely thick headed. Also, the tables you're restoring
>might contain corrupted data which would segfault your backend. :)
>
>I assume you will be starting from the point were your restarted your DB...
>
>grep "INSERT INTO record" [your db backup file] > record.sql
>grep "INSERT INTO recorded" [your db backup file] > recorded.sql
>cat record.sql | mysql -u mythtv -pmythtv mythconverg
>cat recorded.sql | mysql -u mythtv -pmythtv mythconverg
>
>This should do the trick
>
>You could also retrieve the "oldrecorded" table containing your
>previously recorded programs.
>
>cyth
>
>  
>
Thanks for your help. That did the trick. Any ideas what would have 
caused the problem and how to prevent it in the future?
I ran mysqlcheck on mythconverg after it crashed. It showed a bunch of 
tables with this error "'X' clients is using or hasn't closed the table 
properly" on the exported non-functional table. I ran it a second time 
and it ran clean, but re-importing it resulted in the same error.


More information about the mythtv-users mailing list