[mythtv-users] Import Old Previously Recorded database table?

Michael T. Dean mtdean at thirdcontact.com
Mon Sep 1 13:27:52 UTC 2008

On 09/01/2008 09:14 AM, Ryan Wilson wrote:
> I had an 0.20.2 mythtv install that worked great for me. But I had to 
> stop using that computer and I was able to dump the MySQL database 
> before I lost access to that machine. Now I've got a 0.21 mythtv 
> install on a new computer that's working great. I don't mind to 
> reinput the recording schedule for my favorite TV shows, but I hate 
> that the new install doesn't know about all the episodes I watched on 
> the previous Myth box.
> So, my question is, with the database dump from my 0.20.2 box, can I 
> just import the oldrecorded table into my 0.21 database and have it 
> "know" about all the shows I've already seen? Or is more complicated 
> than that? I'm familiar with mysql and SQL and don't mind messing 
> around with them if there is no easier way to restore this data. The 
> tables look the same so I think I'll just try it out and see what 
> happens, but I'd like to see if anyone else had any experience with 
> this or know if the contents of the table depended on anything else 
> that I should also import.

You need to:

a) back up your existing (0.21) database
b) drop your existing database
c) run mc.sql
d) restore your old (0.20.2) database
e) run mythtv-setup (to upgrade the 0.20.2 database to 0.21
f) back up the upgraded 0.20.2->0.21 (old) database
g) drop your old database
h) run mc.sql
i) restore your (good/current) 0.21 database
j) do a partial/new-hardware restore of your old database into the new 

However, when doing the partial/new-hardware restore, you will almost 
certainly get some errors due to conflicting ID's (because of the new 
recording rules and some other stuff in your new database).  Therefore, 
since your new one is probably much smaller (and easier to recreate), 
you may be better off using the old upgraded database as your main 
database.  Basically, instead of f-j, do:

f) do a partial/new-hardware restore of your new database into the old, 
upgraded database or just import the few new 0.21 recordings using 
something like myth.rebuild_database.pl or just put the few new 0.21 
recordings into MythVideo

I highly recommend:  

Note that because of conflicts, doing a partial/new-hardware restore of 
either database into the other may require some manual effort.  If so, 
take a look at http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 to get 
an idea of which data is important.


More information about the mythtv-users mailing list