[mythtv-users] Mytharchive - Time Date Mismatch Imported Database

Michael T. Dean mtdean at thirdcontact.com
Thu Jan 4 18:41:31 UTC 2007


On 01/04/2007 10:57 AM, scott at tbwifi.ca wrote:
> I would like to add some more details to my particular situation.  I have
> exported my old database from a previous version using the techniques
> listed in http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5.  I followed
> the same restore instructions for bringing it into the new version.  This
> procedure did allow me to watch the old recordings.  What appears to be
> still “broken” is that the cut points are missing.  This is fixed with a
> new transcode.  The more serious problem lies with the inability to
> produce a DVD archive of even a newly transcoded “fixed” file.  Mike has
> suggested what appears to be another iteration of the backup, restore, and
> additional mythtv-setup all within the new 0.20 version.  Does this fix
> the name, date, and time issues that seem to be the stumbling block with
> archiving older files?
>   

The only supported way to upgrade the data in your database is to let 
MythTV do it. The only reason you have to go through lots of steps 
(another iteration of exports/imports) is because you didn't let Myth 
upgrade your data in the first place so now you have /both/ old-format 
and new-format data.

The correct procedure is:
a) export the old-version database
b) import the old-version database (in its entirety), if necessary (This 
step is unnecessary if you did not modify your MySQL install and its 
databases (i.e. if the database contents are identical to the exported 
data).)
c) start the new version of MythTV's mythtv-setup, mythfrontend, or 
mythbackend to upgrade your database


If you are creating a new MythTV system (i.e. new hardware with a new 
hostname/IP address), you can:
a) export the old-version old-host database
b) run mc.sql to create a new database on the new host
c) start mythtv-setup on the new host (to create the new database's 
schema) and exit
d) import "partial" data as described in 
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7
e) run mythtv-setup to configure your new MythTV system.


If you have a bunch of SQL statements created when archiving a show and 
its metadata, you should import the metadata before the version upgrade. 
Even if you don't put the file in place on the filesystem, importing the 
data will allow Myth to automatically update its metadata. Then, you can 
re-export the metadata for the new version of MythTV.

Or, you can write and--/much/ more importantly--promise to maintain for 
the indefinite future all the code necessary to allow Myth to import 
data from any previous version of Myth, while performing all the 
necessary updates to that data--including all the database updates to be 
added in the future. As a point of reference, Myth is currently at 
database schema version 1174. That's a lot of previous schema (and, 
therefore, metadata format) changes.

My $0.02:
I don't think Paul should be expected to do all the above-mentioned work 
(and I realize you weren't volunteering him to do it, but the message 
came across a little "pointed"). After all, he's keeping plenty busy 
just maintaining all the code he currently maintains. Instead, I think 
we should be thanking him for a wonderful addition to 
Myth--MythArchive--and for all his efforts on the project and, if 
possible, we should be volunteering to help him improve the project.

Perhaps, rather than removing exported metadata from the database, that 
data should be maintained in an "Offline" recgroup (hidden like the 
LiveTV recgroup) or something, so it can be upgraded with the database. 
(Regardless of what many seem to think, the data about recordings--even 
2, 4, 6+ years of recordings--takes very little storage space.) Doing so 
would require significantly less developer time--allowing devs to create 
more new and useful functionality for Myth. I have an interest in 
"offline" data for MythVideo, and in a couple months, I may have some 
time to play with Myth, again. Maybe then I'll look at making some 
patches for MythVideo and MythTV/MythArchive...

Mike


More information about the mythtv-users mailing list