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

Mailing List Archive: MythTV: Users

Detecting a partially corrupt database - 0.21 -> 0.22 upgrade

 

 

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


DEPontius at edgehp

Feb 9, 2010, 5:14 PM

Post #1 of 2 (306 views)
Permalink
Detecting a partially corrupt database - 0.21 -> 0.22 upgrade

There have been instructions about how to fix database with latin1/utf8
"corruption", as part of an upgrade from 0.21 to 0.22. There are also
instructions for how to handle "partial corruption", which involves
throwing away quite a bit of information.

How does one detect partial corruption?

The only way I can infer so far is to do the "fully corrupt" database
fix, then try the 0.21 -> 0.22 upgrade, and pray. If it fails,
downgrade back to 0.21, use a backup and try the "partially corrupt"
database fix, then try the upgrade again and pray some more. If that
fails, kiss a few hundred Gig of recorded TV goodbye. Start over.

I'm running Gentoo, so I've tweaked my.cnf from utf8 to latin1 - several
times, because several times it's gone back to utf8. I've had 1 Gentoo
backend, multiple Gentoo frontends, and 1 Ubuntu frontend connected at
various times. I don't even know the state of my.cnf on the Ubuntu
machine, since it's with my daughter at school.

For these reasons, I think I'm in trouble, but I don't know how much,
and I don't know how to find out, other than to spend a whole pile of
time going back and forth.

I dump my database daily, bzip2 it, and rotate 7 of them. I've gone in
looking at it to discover stuff, primarily setup information. Is there
something I can look for in the database dump that will give me some
sort of answer as to whether I have partial corruption?

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


mtdean at thirdcontact

Feb 9, 2010, 7:47 PM

Post #2 of 2 (282 views)
Permalink
Re: Detecting a partially corrupt database - 0.21 -> 0.22 upgrade [In reply to]

On 02/09/2010 08:14 PM, Dale Pontius wrote:
> There have been instructions about how to fix database with latin1/utf8
> "corruption", as part of an upgrade from 0.21 to 0.22. There are also
> instructions for how to handle "partial corruption", which involves
> throwing away quite a bit of information.
>
> How does one detect partial corruption?
>
> The only way I can infer so far is to do the "fully corrupt" database
> fix, then try the 0.21 -> 0.22 upgrade, and pray. If it fails,
> downgrade back to 0.21, use a backup and try the "partially corrupt"
> database fix, then try the upgrade again and pray some more. If that
> fails, kiss a few hundred Gig of recorded TV goodbye. Start over.
>

Basically--although there's no need to downgrade back to 0.21. Make a
complete backup before upgrading to 0.22 and it will work for all the
restores...

So, you've probably already run 0.22 and it told you there was data
corruption in your database. If so, try the instructions for the
"equal"/"full" corruption.

If that doesn't work, drop the database, then use the same full backup
you did before attempting to upgrade to 0.22 and use it for the partial
corruption fix--along with the "blank" 0.21-fixes database I posted at
http://www.gossamer-threads.com/lists/mythtv/users/406111#406111 .

> I'm running Gentoo, so I've tweaked my.cnf from utf8 to latin1 - several
> times, because several times it's gone back to utf8.

Yeah, it's quite possibly you'll have partial corruption then... :(

> I've had 1 Gentoo
> backend, multiple Gentoo frontends, and 1 Ubuntu frontend connected at
> various times. I don't even know the state of my.cnf on the Ubuntu
> machine, since it's with my daughter at school.
>
> For these reasons, I think I'm in trouble, but I don't know how much,
> and I don't know how to find out, other than to spend a whole pile of
> time going back and forth.
>
> I dump my database daily, bzip2 it, and rotate 7 of them. I've gone in
> looking at it to discover stuff, primarily setup information. Is there
> something I can look for in the database dump that will give me some
> sort of answer as to whether I have partial corruption?
>

You'd just have to see (and be able to recognize) corrupt character
representations--taking into account that depending on how you're
viewing it, the characters may be corrupt /and/ look correct.

The best bet is to rely on the database upgrade failures to tell you
that the database you're attempting to upgrade is corrupt.

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

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.