[myth-ie] not losing recordings from an install

Brendan Kehoe brendan at zen.org
Wed Oct 24 05:54:07 CDT 2007


I'm going to keep digging around  to try to find the answer (beyond my
stream of consciousness below), but will also see if it's already in any
of your heads. :)

I've got MythTV 0.20 (0.20.20060828-3) on the FC3 box.  I want to figure
out how to dump the info about the recordings we've got so that when the
new system is up, I can suck that dump into the new database and have it
magically understand the recordings I'll be putting onto the new disk.

The biggest problem I can think of is how the channel numbers are going
to be changing.  (I want to create all of the channels to match the
numbers used by NTL, and just stick lots of filler channels not visible
for those numbers not yet used.)

Looking in a full dump (mysqldump --all-databases -u root  -p) I can see

INSERT INTO recorded VALUES (2003,'2007-10-23 20:30:00','2007-10-23
21:00:00','The Daily Show with Jon Stewart','','Award-winning late-night
chat show with comic reports and sketches on American current affairs
with satirist Jon Stewart.','Current
affairs','shuttlecraft.network.home',0,0,0,1,0,'Default',219,'11553716','',20071023210000,1155391488,0,1,'2007-10-23',0,733337,0,0,1,0,'2003_20071023203000.mpg','2007-10-23
20:30:00','2007-10-23 21:00:00','Default','Default',1,0,0);

It's recording from More4 which is channel 92, aka NTL channel 118. 

The primary key of 'recorded' is "chanid int(10) unsigned", aka the 2003
above.  That comes from

INSERT INTO channel VALUES
(2003,'92','118',2,'More4','More4','/usr/share/mythtv/icons/tv/more4.gif',0,'','more4.channel4.com',0,32768,32768,32768,32768,'Default',0,1,'',0,NULL,NULL,NULL,0,0,0);

In the 'channel' TABLE it has

    CREATE TABLE channel (
      chanid int(10) unsigned NOT NULL default '0',
      channum varchar(10) NOT NULL default '',
      freqid varchar(10) default NULL,
    ...

So ignoring channum 92 (which I'll want to have as the NTL channel 118
with the new system), then I just need to find More4 in the 'channel'
TABLE, and given its new 'chanid', Adjust the 'INSERT INTO' above to
have the new 'chanid' value.

Hmm.  It would seem the adding of all the channels (mapping to the NTL
Digital Cable numbers) is going to take a while.

Time to dig out the O'Relly MySQL book on my shelf, unless there's an
easier way.

B



More information about the MythTV-Ireland mailing list