<div dir="ltr"><div>I have multiple MythTV server installations, mostly not the current version.  They all have recorded shows.  I would like to combine them all into my current server, although there are some more modest goals that would be useful.  I'm looking for advice on how to proceed.  I am comfortable programming, including using SQL.</div><div><br></div><div>I can run the other installations in real or virtual machines, or I could access the files directly.</div><div><br></div><div>It's mostly recordings of TV shows I want to combine.<br></div><div><br></div><div>There is quite a bit of information about this in the mailing list and the wiki, but I haven't seen anyone offering a program that does this.</div><div><br></div><div>The intermediate goal would be to import the information on what shows I've recorded into my current installation, so that I don't record stuff I already recorded.</div><div><br></div><div>Among the advice:</div><div>1) First convert all databases into the current format.</div><div>2) Never modify the database with SQL directly.  Though I'm happy to use python, with or without the services API, to delete a recording, it seems unlikely I'll avoid working in SQL.</div><div><br></div><div>As to the main conversion, there have been a range of responses:</div><div>3) It's not possible.</div><div>4) Export and reimport the recorded (and maybe oldrecorded? oldprogram?) tables.  The references to recording rules, channel ids, and other stuff will be messed up, but the basic information should be there. (<a href="https://lists.gt.net/mythtv/users/442688" target="_blank">https://lists.gt.net/mythtv/users/442688</a>)  If I copy the actual recordings to the current server, I should be able to watch them.  My guess is that pulling this off might require fiddling with the ids to avoid collisions.  Also, don't copy stuff marked as future.</div><div>5) Use some kind of myth or mysql database tool to dump the database, make "adjustments" and import it.  The non-existence of a script that does this suggests this is difficult.</div><div><br></div><div>4) seems attractive.  I am not interested in migrating things like the channel and tuner setups or (probably) recording rules from old installations, except insofar as it allows me to make sense of the info I've migrated, e.g., what channel a recording is from.  I am somewhat unclear on the roles of recorded, oldrecorded, program, and oldprogram* in the system, and I've been somewhat puzzled by the fact that information in fields  that are defined for these tables is sometimes missing (e.g., oldrecorded's season and episode are always 0, though recorded and  program have the information). </div><div><br></div><div>I guess I can't just blow off chanid, recordid and programid since the table definition requires them to be non-NULL.  I'm not sure if it requires them to be valid foreign keys; <a href="https://www.mythtv.org/wiki/Development_guide">https://www.mythtv.org/wiki/Development_guide</a> says they are, but "show create table" does not show any formal foreign key constraints.  If such a constraint is in effect and the existing value is out of range, it will cause an error.  Otherwise it will just be a random bogus reference.   At any rate, recordedid would need to respect the primary key constraint.</div><div><br></div><div>Does the information of which recording rule is associated with a particular recording (the recordid field) matter, or is it just informational?<br></div><div><br></div><div>A perhaps simpler version of 4 is the suggestion to use MythArchive to move the recordings (see thread referenced earlier).</div><div></div><div><br></div><div>It is likely I have some recording of the same show/episode made on different systems.  It is very unlikely the recordings will have been made at the same time.<br></div><div><br></div><div>Thanks for any advice.</div><div>Ross</div><div><br></div><div>*Here's what I gather from the descriptions (<a href="https://www.mythtv.org/wiki/Category:DB_Table">https://www.mythtv.org/wiki/Category:DB_Table</a>) of  recorded, program and the old* versions: program holds listings of the last couple of weeks and upcoming programs in the sense of a particular broadcast at a particular time on a particular channel, so they are from the listings provider.  recorded has recordings actually made (or, maybe, attempted, or not done because they were duplicates--those are definitely in oldrecorded) and still available for viewing.  oldrecorded has everything in recordings + recordings that were deleted + future recordings.  oldprogram has only the title and time, and probably exists only to help myth decide if an upcoming program is new.  Since it records only the title, not the subtitle, episode info, or original airdate, I'm not sure how it has enough info to do even that.<br></div></div>