<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Message: 16<br>
Date: Mon, 23 Feb 2009 21:18:39 -0500<br>
From: &quot;Michael T. Dean&quot; &lt;<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>&gt;<br>
Subject: Re: [mythtv-users] Channel Line-up Export<br>
To: Discussion about mythtv &lt;<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:49A358FF.6040505@thirdcontact.com">49A358FF.6040505@thirdcontact.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 02/23/2009 09:11 PM, MrVining wrote:<br>
&gt; On Feb 23, 2009, at 7:49 PM, Nick Rout wrote:<br>
&gt;&gt; On Tue, Feb 24, 2009 at 10:15 AM, MrVining wrote:<br>
&gt;&gt;&gt; I&#39;m building a new MythTV master backend as we speak.  I&#39;ve done some<br>
&gt;&gt;&gt; googling and searched the wiki a bit, but I not really finding<br>
&gt;&gt;&gt; much.  Is<br>
&gt;&gt;&gt; there a somewhat simple way to export/backup my channel line-up?<br>
&gt;&gt; just the channel line up or the whole database?<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://www.mythtv.org/wiki/Database_Backup_and_Restore" target="_blank">http://www.mythtv.org/wiki/Database_Backup_and_Restore</a><br>
&gt; Just the Line-up.  Partly because I want to do a sort of perm. backup<br>
&gt; of some of my setup.<br>
<br>
There&#39;s a section on that wiki page that talks about backing up<br>
xmltvid&#39;s.  I&#39;m planning to rewrite the backup/restore support to make<br>
it easier (will be a normal full backup instead of a special backup).<br>
The restore will then take a look at the old channels and try to match<br>
them up with the new channels and try to modify the settings of the new<br>
channels to match what you had previously (i.e. things like xmltvid,<br>
useeit, visible, ...).<br>
<br>
However, I doubt there will /ever/ be a (safe/reliable) way to just<br>
backup up and then restore the channels (and all associated channel<br>
info) themselves.  Instead, you&#39;d have to do a backup, fetch channels<br>
from listings provider or scan for channels, then &quot;restore&quot; channel<br>
settings on top of the new channels.<br>
<br>
The best backup--for now or after I finish the channel restore<br>
rewrite--is a full backup.<br>
</blockquote><div><br><br>Is there something special about the xmltvids ? I&#39;m only using them for my analog source, as everything else has EIT (DVB-S/S2 and DVBC). I have actually setup test backends by dumping my channel information and then importing it into the new backend, as I&#39;ve had lots of problems with the scanner in the past (crashing, inserting bogus multiplexes, associating services with wrong multiplex ids), so it was quicker for me to create a fresh database, and then just reload my channel information, and then from within setup add the cards/inputs  and associate the already defined sources/channels with them.<br>
<br>Here&#39;s my simple script which I run from cron on a weekly basis (I also dump the recordings information, but you may not want that, so I&#39;ve left that out), that I&#39;ve used to move the channel information to the new backend.<br>
<br>---------------------<br>#!/bin/sh<br>#<br><br>BACKUPDIR=/recordings/backup<br>DBHOST=d925<br>DBUSER=mythtv<br>DBPASS=mythtv<br>DBNAME=mythconverg_s2<br><br><br>mysqldump --no-create-db --add-drop-table -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME dtv_multiplex channel | gzip -9 -c &gt; $BACKUPDIR/channelmultiplex-`date +%Y%m%d%H%M`.gz<br>
</div></div>----------------------<br><br>I also run a script which deletes all of the backups older than 1 month, since I&#39;m not likely to be interested in anything bu the latest backups.<br><br>Unfortunately, in the DVB world, transponders are constantly changing with new serviceids, so theres not really a way around rescanning every once in awhile.<br>
<br><br><br><br><br>