[mythtv-users] Upgrading database from .18 to .19 then to .20
Michael T. Dean
mtdean at thirdcontact.com
Tue Sep 12 16:52:23 EDT 2006
On 09/12/06 16:06, Stephen Atkins wrote:
>Hello all. Since .20 came out I thought I would give it a try. But I
>noticed that my .19 upgrade (back when it first came out months ago)
>didn't upgrade everything in my DB. Now since it has been months and
>I've got a ton more data in there I'm wondering what will happen if I
>try and move to .20.
>
>What tipped me off was mysql complaining about a table with no columns
>(oldrecordings). I also noticed that the cutlist column in recorded was
>still a tiny int not text.
>
>Is there anyway I can get a script that will fix up my current .19 db so
>its not even worse after moving to .20?
>
>
You can go from 0.18 database to 0.20 database without ever installing
0.19. (Couldn't figure out which you're currently using.) However,
that assumes that your 0.18 database is correct. And, likewise,
upgrading from 0.19 to 0.20 assumes that your 0.19 data is correct.
If you're concerned about the quality of your database tables/data, my
recommendation is (/before/ you upgrade to 0.20--note that you can't
upgrade until step q)
a) do a backup of your current (non-0.20) database (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 )
b) drop the database (logged in as MySQL's root user, "DROP DATABASE
mythconverg;")
c) create a new database (for the version you're currently
using--not 0.20) ( http://mythtv.org/docs/mythtv-HOWTO-6.html#ss6.2 )
d) start mythtv-setup (for your current version--not 0.20--to create
and populate tables with the initial values) and then exit (without
changing anything)
e) do a "partial" import (i.e. a "new hardware" import) (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 ). Note that you can
probably also import the settings table to get most of your settings
back (but you'll have to either truncate the table created by
mythtv-setup or change the backup script to use REPLACE INTO for the
settings table). Also, feel free to import any other non-suspect
tables--especially plugin tables, like videometadata or gamemetadata or
...--but if you're concerned the table or its data is corrupt, you're
better off re-creating that data.
f) backup the database (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 )
g) use mythtv-setup to fix any settings/configure cards, video
sources, channels, and inputs, etc.
h) backup the database (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 )
i) cross your fingers
j) start mythbackend
k) start mythfrontend
l) edit the settings in mythfrontend settings
m) shut down mythfrontend
n) shut down mythbackend
o) backup the database (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 )
p) repeat steps g through o for remote backends/frontends, as
required--making sure to repeat steps m through o once all the data is
correct
q) upgrade to 0.20
r) start mythtv-setup (to upgrade your database) and edit the
settings as desired (there are some new ones in 0.20)
s) start mythbackend
t) start mythfrontend and edit the settings as desired (there are
some new ones in 0.20
u) shut down mythfrontend
v) shut down mythbackend
w) backup the database (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 )
x) start mythbackend
y) start mythfrontend
z) let the OC-side of your mind revel in the cleanliness of your new
database
Phewww. I thought I was going to run out of letters.
Mike
More information about the mythtv-users
mailing list