[mythtv-users] Merging master backends?

Dave Phillips family_of_phillips at yahoo.com
Thu Jul 26 16:09:01 UTC 2007



"Michael T. Dean" <mtdean at thirdcontact.com> wrote:
  On 07/26/2007 04:23 AM, Dave Phillips wrote:
> Well I don't recommend this for primetime yet but it at least seemed
> to work for me.
> I ran
> 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.

Really, you need all the (appropriate) information from the tables
listed in the HOWTO I mentioned (
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 ). You only need to
import entries from record if you want the recording rules to be moved
over. (You could instead create them on the new system.)


By "appropriate informatoin" I mean you only need the entries that
correspond to the recordings you're moving over. However, since that
would be 1 entry in recorded, oldrecorded, recordedprogram, and
recordedrating, but would be multiple (tens of entries, but not any
consistent number) in recordedmarkup and around (though not exactly)
3600 entries per half hour of recording duration in recordedseek,
finding the right entries is much harder than just importing everything
and "deleting" the "recordings" (no file necessary) you don't want.

> 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.

The channel ID and starttime is used as a unique key in most of the
tables you'll be using. If they're identical on more than one
recording, you'll have problems.

> My next step is to cleanup my old backend and then do this completely.

I recommend taking a look at the HOWTO and wish you good luck with the
record uniqueness constraint.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

  I looked at the list and decided I personally didn't care about the extra tables.
  From the README
  $ grep "INSERT INTO \`record\` "          mythtv_backup.sql > restore.sql
$ grep "INSERT INTO \`recorded\` "        mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`oldrecorded\` "     mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedprogram\` " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedrating\` "  mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedmarkup\` "  mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedseek\` "    mythtv_backup.sql >> restore.sql
   
  
Record has the recording rules, which I don't need as I have already recreated them.
  Recorded I did.
  oldrecorded seems to be there only so that Myth knows if I have already recorded the show, but the entries don't "have" to be there.
  recordedprogram has all the detailed information about the records in the recorded table and I should have grabbed this one.
  recordedrating  has the ratings of the shows in the recorded table and I didn't care if I had those or not.
  recordedmarkup has the commercial and cut marks and I didn't care about those 
  recordedseek stores a time vs. byte offset mapping (seektable) for each recording in the recorded table to enable accurate forward and backward time skipping, I could have used this one.
   
  So like I said this was just my experiment to see if I could at least watch the shows from the old box.
  And I could.
  Going forward I think I will probably increment the chanids by some large number( 100000 maybe) before I do the dump from the old machine.
   
  I will then do the dump the tables listed below (even though I don't personally need them)
   
  mysqldump -u mythtv -p -t mythconverg recorded recordedprogram recordedrating recordedmarkup recordedseek > recordings.sql
   
  (of course if you want you recording rules and want to let myth know about the old shows you could put record and oldrecorded in the list)

Backup my current tables (just in case)
  Copy over all the video files from the old backend.
  Stop the new backend.
  Run the recordings script.
  mysql -u mythtv -pmythtv mythconverg < recordings.sql 
Restart mythbackend.

       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070726/1a1a6975/attachment.htm 


More information about the mythtv-users mailing list