Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

restore borked db

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


junk at umich2

Mar 10, 2005, 4:35 PM

Post #1 of 6 (1725 views)
Permalink
restore borked db

Something in mythconverg was causing the frontend to seg fault while
connecting to the backend. I backed up the bad db and installed a fresh
one. What is the easiest way to pull info out of the bad db to insert
into the good one? The only parts I really would like to retrieve are
the listings for the recorded shows and my recording schedule. I'm
running 0.17 from atrpms.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cythrault at gmail

Mar 10, 2005, 5:11 PM

Post #2 of 6 (1626 views)
Permalink
Re: restore borked db [In reply to]

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

On Thu, 10 Mar 2005 17:35:07 -0700, pmb <junk [at] umich2> wrote:
> Something in mythconverg was causing the frontend to seg fault while
> connecting to the backend. I backed up the bad db and installed a fresh
> one. What is the easiest way to pull info out of the bad db to insert
> into the good one? The only parts I really would like to retrieve are
> the listings for the recorded shows and my recording schedule. I'm
> running 0.17 from atrpms.


kuphal at dls

Mar 10, 2005, 5:29 PM

Post #3 of 6 (1633 views)
Permalink
Re: restore borked db [In reply to]

cythraul wrote:

>This demonstrates again the need for some kind of easy-to-use backup
>and recovery tool for myth.
>
>
Easier than this?

http://www.mythtv.org/docs/mythtv-HOWTO-21.html#ss21.5

Kevin
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cythrault at gmail

Mar 10, 2005, 6:19 PM

Post #4 of 6 (1617 views)
Permalink
Re: restore borked db [In reply to]

Indeed it can't be easier... for proficient Linux users.

One could argue that by running MythTV you agree to get your hands
dirty. But with things like knopmyth, minimyth and other easy to
install myth-based distros you're getting more and more users who just
wanna watch some TV.

MythTV going mainstream? Does it sound freaky?

What I have in mind is some kind of DB manipulation GUI or whatever.
For example, I want to backup my recorded programs because I need to
rebuild my system for some reason. I get into the "Backup/restore
tool", export the table by selecting "backup my recorded program",
unselect "keep old records" and click "burn" or "save to" then select
a media, different volume, networked SMB or NFS share…

Later, I get back to the "Backup/restore tool", select import from
backup. Select what I need to restore. Et voilà!

It's just a fuzzy idea. I feel there a need for something more user
friendly and I wanted to put the idea in the hope it could stir
something beneficial for everyone. ;)

cyth

On Thu, 10 Mar 2005 19:29:51 -0600, Kevin Kuphal <kuphal [at] dls> wrote:
> cythraul wrote:
>
> >This demonstrates again the need for some kind of easy-to-use backup
> >and recovery tool for myth.
> >
> Easier than this?
>
> http://www.mythtv.org/docs/mythtv-HOWTO-21.html#ss21.5


junk at umich2

Mar 10, 2005, 9:08 PM

Post #5 of 6 (1629 views)
Permalink
Re: restore borked db [In reply to]

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.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cythrault at gmail

Mar 11, 2005, 3:15 AM

Post #6 of 6 (1634 views)
Permalink
Re: restore borked db [In reply to]

I'm glad you were able to get your stuff back.

As for the cause of the problem, I can't say. How to prevent it? Backup! :)

On Thu, 10 Mar 2005 22:08:02 -0700, pmb <junk [at] umich2> wrote:
> 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.

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.