[mythtv-users] Detecting a partially corrupt database - 0.21 -> 0.22 upgrade
Michael T. Dean
mtdean at thirdcontact.com
Wed Feb 10 03:47:58 UTC 2010
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
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
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
> 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.
More information about the mythtv-users