[mythtv-users] Database Upgrade Questions
Michael T. Dean
mtdean at thirdcontact.com
Mon Aug 27 15:02:56 UTC 2007
On 08/27/2007 07:47 AM, makalu at ansae.com wrote:
> Separately, I have a question about moving my old data to a fresh db. I
> think I'm going to just upgrade mythtv while leaving my system as-is even
> though it's old (FC3). However, if I did want to build a new system, I'm not
> sure how to properly migrate the data from my version 0.18 database.
First, shut down all your MythTV processes and backup your 0.18 database
( http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 ). Then, copy the
backup to the new system and follow the instructions in 23.7. Then,
when you run mythtv-setup, it will upgrade the old database format to
the new DB format.
> Specifically, if I start by making a sql dump of my old database, then built
> a new system and created a new database with the latest mc.sql script from
> the 0.20 tarball, wouldn't that create a version of the db schema that might
> not be compatible with the dump I made of the 0.18 db?
Correct. You don't use mc.sql--you import an existing 0.18 DB (or
partial DB) instead.
> Instead, should I go
> to svn to get the version of the mc.sql script for the 0.18 release to
> create an initial db compatible with my sql dump?
No. In fact, mc.sql simply creates the database and authorizes the
mythtv user to use it. It does /not/ create a database schema. (You
get a DB with no tables). So, mc.sql hasn't changed in millenia. :)
> Then the mythtv install
> could upgrade it to the 0.20 schema.
Though you need not only the DB schema but also the DB data upgraded.
Therefore, you must import the 0.18 backup (or partial backup) and let
that be upgraded.
More information about the mythtv-users