[mythtv-users] converting a .20.2 database to .21

Michael T. Dean mtdean at thirdcontact.com
Wed May 7 18:45:22 UTC 2008


On 05/07/2008 02:24 PM, Fred Squires wrote:
> On Wed, May 7, 2008 at 2:02 PM, scram69 <scram69 at gmail.com> wrote:
>   
>> I'm thinking through my usual procedure for upgrading my backend
>> distro, and I believe I've run up against a problem.
>>
>> In the past, I've installed a newly released version of Ubuntu on a
>> separate partition on my OS drive.  Once I have Myth installed and the
>> OS is tweaked the way I like, I boot back to the old partition, dump
>> mythconverge, reboot to the new partition, load up mythconverge, and
>> off I go.
>>
>> However, the latest version of Ubuntu (8.04), installs Myth 0.21.  I'm
>> guessing that I can't just load up the database that I dump from
>> 0.20.2 running under 7.10 into 0.21.
>>
>> I understand that if I were to simply point to backports and upgrade
>> to 0.21 under 7.10, part of the process would convert my 0.20.2
>> database to 0.21.  Does anyone know of a way I can do this as a
>> stand-alone procedure?  i.e. backup my 0.20.2 database, run a
>> conversion script on it, and then point my 0.21 installation at it?
> That's basically how I did it, but I upgraded from Fedora 5 to 8.
> MythTV will upgrade your database when you run mythtvsetup.

Right, it's MythTV (specifically mythtv-setup or mythbackend) that 
upgrades the database, not the distro-specific MythTV package upgrade 
that does it.

Note, though, you need to have a 0.20.2 database in place for the 
upgrade to work.  That means you need to do the restore of your 0.20.2 
database into an /empty/ database (i.e. the one create by passing mc.sql 
to the mysql command-line client-- 
http://mythtv.org/docs/mythtv-HOWTO-6.html#ss6.2 ).  So, don't run 
mythtv-setup or mythbackend before doing the restore.  If you (or 
someone else--such as a packager script) does run it, you'll need to 
issue the command, "DROP DATABASE mythconverg;" to MySQL and then  
create the initial database, as above (in #ss6.2).

Also, make sure you use mysqldump to create the backup (as it's the 
most-likely-so-succeed approach--compared to using the database binary 
files directly--when upgrading your system (probably including MySQL)).

You may also want to see 
http://www.gossamer-threads.com/lists/mythtv/users/332734#332734 for 
some scripts you can use to help create and restore the database (and, 
at the same time test some new functionality that will be in 0.22).  The 
scripts work with any version of Myth.

Mike


More information about the mythtv-users mailing list