[mythtv-users] Merging master backends?
family_of_phillips at yahoo.com
Thu Jul 26 08:23:17 UTC 2007
Ken Mandelberg <km at mathcs.emory.edu> wrote: Dave
I would like to see the script. It seemed to me that merging was going
to be more complicated than migrating to a new database because of
conflicts in some fields. For example the chanid ssems to be instance
specific even for two masters using the same lineup.
Dave Phillips Wrote
I am in the same situation.
I haven't seen any detailed steps for it yet.
But here is what I was going to do when I had the time.
1. extract(backup) the contents of the recordings database from the
master I am retiring.
2. copy all of the recordings from the retiring boxes myth/tv
directory to the new single master /myth/tv directory
3. Import(restore) the contents into the new single masters database
using the script generated in step 1.
Of course I would do all those things you are supposed to do like
backup the database before, blah blah blah.
Now I "had" the script to extract what was needed and create a series
of insert statements but I can't find it right now.
I will post it tonight if I can dig it up.
Ken Mandelberg wrote:
I have two independent master backends, and I would like to convert one
into a non-master logically merging the contents.
Any pointers on this?
mythtv-users mailing list
mythtv-users at mythtv.org
Well I don't recommend this for primetime yet but it at least seemed to work for me.
mysqldump -u mythtv -p -t mythconverg record recorded oldrecorded recordedprogram recordedrating recordedmarkup recordedseek > recordings.sql
Then I looked at the output and decided I probably only needed the insert statement for the recorded shows.
So I deleted everything except one insert statement for the "recorded" table.
LOCK TABLES `recorded` WRITE;
/*!40000 ALTER TABLE `recorded` DISABLE KEYS */;
INSERT INTO `recorded` VALUES (1009,'2006-11-06 21:00:00','2006-11-06 22:00:00',
'Smallville','Fallout','Clark learns Raya managed to escape from the Phantom Zon
e and has come to see him; Baern (Bow Wow), a killer who also escaped, takes them on as revenge for his imprisonment.','Action','mythtv',0,0,0,0,1,'Default',69,
0,0,1,0,'1009_20061106210000.nuv','2006-11-06 21:00:00','2006-11-06 22:00:00','D
/*!40000 ALTER TABLE `recorded` ENABLE KEYS */;
I copied over the nuv file to the new machine /myth/tv
Stopped the mythbackend on the new machine
Ran the insert statement.
mysql -u mythtv -pmythtv mythconverg < single.sql
Restarted the backend
I then went to the myth frontend on the new machine and watched the copied over show.
A couple of things I still need to fix though.
The show wasn't in it's correct category so I suspect that was in one of the insert statements I didn't bother with.
As well for some reason the show wouldn't display on my xbox frontend, but it previewed fine and I had no problem previewing or watching it on my new backend machine.
I suspect you are correct about the channel id's but I don't see how it would matter for a show that is already recorded.
Sort of like if you had some shows recorded and then had to do a new channel scan and the old id's got blown away.
You could still watch the old shows.
My next step is to cleanup my old backend and then do this completely.
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-users