[mythtv-users] Channel Line-up Export

R. G. Newbury newbury at mandamus.org
Tue Feb 24 22:47:55 UTC 2009

Michael T. Dean wrote:
> On 02/23/2009 09:11 PM, MrVining wrote:
>> On Feb 23, 2009, at 7:49 PM, Nick Rout wrote:
>>> On Tue, Feb 24, 2009 at 10:15 AM, MrVining wrote:
>>>> I'm building a new MythTV master backend as we speak.  I've done some
>>>> googling and searched the wiki a bit, but I not really finding 
>>>> much.  Is
>>>> there a somewhat simple way to export/backup my channel line-up?
>>> just the channel line up or the whole database?
>>> http://www.mythtv.org/wiki/Database_Backup_and_Restore
>> Just the Line-up.  Partly because I want to do a sort of perm. backup 
>> of some of my setup. 
> There's a section on that wiki page that talks about backing up 
> xmltvid's.  I'm planning to rewrite the backup/restore support to make 
> it easier (will be a normal full backup instead of a special backup).  
> The restore will then take a look at the old channels and try to match 
> them up with the new channels and try to modify the settings of the new 
> channels to match what you had previously (i.e. things like xmltvid, 
> useeit, visible, ...).
> However, I doubt there will /ever/ be a (safe/reliable) way to just 
> backup up and then restore the channels (and all associated channel 
> info) themselves.  Instead, you'd have to do a backup, fetch channels 
> from listings provider or scan for channels, then "restore" channel 
> settings on top of the new channels.

Of course there is a safe/reliable way to just backup the channels. Just 
backup the channel related tables, and restore them later. Most mysql 
restore scripts use --drop-table as a matter of course, so that the 
existing table is entirely replaced when the restore is done. If you do 
that the only reason to 'fetch channels' would be to add new channels to 
the table(s).

mysqldump [OPTIONS] mythconverg  capturecard  cardinput  channel 
channelscan  channelscan_channel  channelscan_dtv_multiplex  codecparams 
  diseqc_config  diseqc_tree dtv_multiplex  dtv_privatetypes

That should cover ALL of the channel *and* card related data. You need 
both, since cards are tied to inputs, and inputs to sources and sources 
to channels. At the least you need dtv_multiplex for frequencies, 
channel, cardinput and capturecard for north american OTA, plus others 
for satellite etc. Most of these tables are empty in my setup.

Make a full backup then do some playing around. The output of mysqldump 
is a text file which you can open with vi or openoffice and see what you 


         Please let me know if anything I say offends you.
          I may wish to offend you again in the future.

More information about the mythtv-users mailing list