[mythtv-users] Merge of a more recent database into an older one.

Stephen Boddy stephen.boddy at btinternet.com
Mon Jan 19 21:04:07 UTC 2009


Quick background: I have a "proper" backend system which records
programs located in A, but I spend most time in B. (Don't ask, too
dull/complicated to explain here).

To watch recordings I have an older DB in my laptop with an external
disk containing the files setup as a tuner-less backend.

Both systems run the same version of MythTV (0.21) although the fixes
version might differ slightly. Every so often I visit the real backend,
and dump the DB and copy the files across to an external drive.

So the question is: How do I merge the recent DB backup into my older DB
so that I have access to both older and newer recordings? I did try
googling for [mythtv database merge] but I wasn't really getting any
traction.

I can see the relevant INSERT statements, and pull them out of the
mythconverg backup. I'm wondering:
 a) will this procedure cause issues?
 b) which tables INSERT statements do I actually need for recordings?
 c) has anyone else tried this, and if so, how'd it go?

On (a) so far, I see a couple of issues already.
- There was a rebuild of the real backend due to a HD failure. This
means that wherever there's a key, (i.e. recordedcredits -> people) then
there'll probably be a conflict with old data,
  + If I use a temporary database, I could munge the records (+10000 to
the numbers or similar,) not critical and could be funny (i.e. Jeremy
Clarkson starring in "Dude! Where's my car?")
- Channels for recordings will be messed up (DVB-T lineup changes)
although that happened with the real backend anyway,
  + Work out what each of the channels are and point them at the correct
one in the DB, again it's not critical that this is right,
- Because the folders are different, and I won't be able to fit all
files on one external disk, I need to create storage groups so mythtv
knows where the files are,
  + I'll have to be careful and fiddle with the storage groups. (Not
sure if this is critical or not. I believe mythtv will automatically
check any other storage groups if it can't find the file where it
expects it.)

On (b) so far reading the wiki DB docs I'm guessing at:
 people
 recorded
 recordedcredits
 recordedmarkup
 recordedprogram
 recordedseek

TIA for help and suggestions, apologies for the lo-oooong po-oooost...
Steve Boddy




More information about the mythtv-users mailing list