[mythtv-users] How to copy 'frontend' portion of mysql database

Jeffrey J. Kosowsky mythtv at kosowsky.org
Thu Jan 7 16:33:25 UTC 2010

Ronald Frazier wrote at about 10:01:49 -0500 on Thursday, January 7, 2010:
 > > I assume though if I am *adding* a frontend then, I want to skip the
 > > first "DELETE" line of each stanza? Right?????
 > You can skip it, though it won't hurt to run it anyway. Those are just
 > there in case you happened to have started up the frontend already
 > before copying.
 > One thing that isn't covered by my SQL is your playback profile. The
 > currently selected profile may or may not be in the settings table
 > (I'm not sure), but the definitions of the profiles are definitely not
 > in any of those tables.

The following are in my 'settings' profile:
('DefaultVideoPlaybackProfile','My profile name','My machine')
(''MythArchiveDefaultEncProfile','SP','My machine')

 > They are in the displayprofiles and
 > displayprofilegroups tables. Copying those over is a bit more tricky.

In my setup at least, the only machine-specific defs seem to be in
displayprofilegroups not in displayprofiles.

That being said, it does seem like one would want to copy those over
Why wouldn't the following work (adopting your earlier scripts and
assuming I understood the syntax)

DELETE FROM settings WHERE hostname ='<NEWHOSTNAME>';
INSERT INTO settings(name,  hostname, profilegroupid) SELECT name,
"<NEWHOSTNAME>", profilegroupid FROM settings WHERE hostname = "<OLDHOSTNAME>"

Or is there a problem if you duplicate profilegroupids?

 > It looks like the mythweather settings are also stored in their own tables.

It would certainly be nice if there were an easy way to separate
system-wide configurations from backend-specific configurations from
frontend-specific configurations...

More information about the mythtv-users mailing list