[mythtv-users] 0.22 database upgrade woes

Michael T. Dean mtdean at thirdcontact.com
Sun Feb 21 13:20:24 UTC 2010


On 02/20/2010 11:09 PM, Dale Pontius wrote:
> Michael T. Dean wrote:
>    
>> On 02/20/2010 09:08 PM, Dale Pontius wrote:
>>      
>>> I tried to take the 0.22 plunge today.
>>>
>>> I'm a Gentoo user, so I was well warned about the possibilities of full
>>> or partial corruption.  Of course I hoped for the best, and was of
>>> course disappointed.  I was flagged as having partial corruption.
>>>
>>> So I followed all of the relevant instructions, dropped the database,
>>> restored the provided blank database, then restored mine on top of it,
>>> and of course backed it up.
>>>
>>> Following this, I attempted 0.22 mythtv-setup.  It upgraded my database,
>>> saving a backup first.  Then it launched into configuration, which I
>>> expected, from the instructions.
>>>
>>> When all is said and done, it has lost all of my recorded programs, my
>>> old recorded programs, etc, etc.  It's as if I had started completely
>>> from scratch.  Nor was there any warning that it was going to object to
>>> the old content, or that it was throwing stuff away.  I've also taken a
>>> dump of the new database, and verified that indeed all of the old
>>> content is gone.
>>>
>>> I was prepared for the worst, so right now I'm on my way back to 0.21,
>>> hoping that there's something I can do to make this work right, next
>>> time.  There is another Gentoo user who has made a script that attempts
>>> to fix partial corruption, but it "knows" that it failed.  I'm giving
>>> feedback to the author, in case it can be improved.
>>>
>>> Google hasn't been my friend on this one, but if there are any other
>>> suggestions, I'm listening.  I guess I can always give up and start
>>> over, but I'd rather not.
>>>
>>>        
>> There's no possible way Myth can "object to the old content or ... throw
>> stuff away."  You didn't restore your database on top of the blank
>> database--instead, you just upgraded the blank database.
>>
>> You need to do a partial restore of your database on top of the blank
>> database.  You also need to verify that doing so is successful.  Use
>> --verbose when doing the restore of the blank database and the partial
>> restore of your database.  Once both steps succeed, then upgrade your
>> database.
>>      
> I can certainly try it again, and at some point I plan to.
>
> But aside from saying that I followed the instructions, my gzipped dumps
> of mythconverg have been typically running in the 6-8 MB range.  When I
> ran mythtv-setup to convert the database, it first tucked a backup in
> /media.  That backup is 8.2 MB, consistent with the sizes I've been
> seeing.  I copied it to /tmp, gunzipped it, and looked at it with a text
> editor.  It has extensive tables for "oldrecorded" and "recorded", to
> key on the two I looked at.  That's the dump mythtv-setup made, not one
> of my own.  As stated in the directions, I also backed up the database
> after following the partial restore instructions.  That backup is also
> 8.2MB.  Oddly enough, the 2 backups are not the same size - mine is
> 8280985 bytes and the mythtv-setup one is 8280967 bytes.

No, that's just due to slight differences in the compression or possibly 
in just a little bit of the data.

>    I'm not sure
> if that is significant.  Nor do I know how large the blank database is.
>   Had I simply upgraded the blank database I would not have expected to
> see my oldrecorded and recorded content in the automatic pre-upgrade backup.
>    

Then if the data was there before the upgrade, it was there after the 
upgrade.  The question becomes, "Where is there?"

> I also backed the database up after running mythtv-setup and
> mythfilldatabase.  That backup is 2012169 bytes.
>    

If the pre-upgrade backup is 8MB compressed and the post-upgrade backup 
is 2MB compressed, then you likely have backups of 2 different 
databases--perhaps using different database names or different host names.

Mike


More information about the mythtv-users mailing list