[mythtv-users] Upgrade from 0.20.2 -> 0.25.2

Michael T. Dean mtdean at thirdcontact.com
Mon Mar 11 19:11:18 UTC 2013


On 03/11/2013 11:12 AM, Robert Dege wrote:
> I'm building a new mythtv system.  The old system is a RedHat 9.0 box, 
> running mythtv 0.20.2, and I'm upgrading to mythbuntu 12.04 running 
> mythtv 0.25.2.
>
> I'm using this guide 
> (http://www.mythpvr.com/mythtv/tips/migrate-recordings.html) to 
> migrate my shows and recording history to the new system.  However, 
> I'm running into import issues (missing columns) due to the difference 
> in age between the mythtv versions.

Please don't use that guide.  It describes how to corrupt your data (or, 
as you seem to be trying to use it, how to corrupt your schema /and/ 
data).  (And feel free to curse Google for telling you that's a good 
page and making it #1 on your search.)

There is no such thing as "migrating" recordings.  You simply do a 
complete backup of your database (using 
http://www.mythtv.org/wiki/Database_Backup_and_Restore --which works 
with any version of MythTV database--and let MythTV upgrade the database 
for you.  You may restore the database backup to another MySQL server if 
you're attempting to move the database between systems or doing a 
complete format/install when upgrading your distro.

The only wrinkle you'll have is that your data from an ancient 0.20 
database schema is too old to be upgraded by MythTV 0.25.  You can 
attempt a workaround of upgrading to 0.23 and then upgrading to 0.25, 
but we can't guarantee that the (huge) changes between 0.20 and 0.22 
will succeed due to changes that have occurred to MySQL and Qt-MySQL 
drivers between when 0.22 was supported and today.  (That said, it 
should work, though may require some effort--effort that will be 
required whether you upgrade the full database or try some hack that 
pulls only part of the data out.  Therefore, there is absolutely no 
reason to attempt to use said hack.)

There is no such thing as "migrating" random selections of 
data--especially across varying DB schema versions--with MythTV.  MythTV 
knows what data needs to change, how the database changed, and what data 
links with what other data, and takes care of it all for you.  It also 
cleans up your database for you--ensuring it never grown "inefficient" 
or "bloated" or ...  All data constraints and integrity management is in 
the MythTV code, so you should use that code to ensure your upgrade 
occurs properly.

So, just do a full backup, then a full restore to a different MySQL 
server (if required), then run mythtv-setup from an upgraded version of 
MythTV (first, 0.23, then do another database backup, then run 
mythtv-setup from 0.25.2--or, better, the currently supported version, 
0.26-fixes).

Just don't change the host name of your system and all will be easy.  If 
you change the host name, you have to do a lot of extra work that I 
don't have time to describe, so just use the same host name.  :)

Mike



More information about the mythtv-users mailing list