[mythtv-users] Remove dead slave server from database?

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 3 15:56:57 UTC 2009


On 04/03/2009 11:42 AM, Robert McNamara wrote:
> On Fri, Apr 3, 2009 at 8:33 AM, Mark Knecht wrote:
>   
>> While it might be 30 seconds for you, it's never been less than 30-60
>> minutes for me, including some testing that everything is probably set
>> up correctly, doing a reboot to ensure everything comes up correctly,
>> looking through log files, etc.
>>     
> It's a quick operation because the lineups, channels, rules, etc. are
> associated with the Video/Listings source, not the tuner card.  So
> what Mike is saying is you delete all the Tuner Cards (Mythtv-setup
> step 2), recreate them, and then just to Step 4 and attach them to the
> inputs.  You skip step 3 entirely and everything will look and act
> exactly as it always has.  He's not exaggerating to say that it's a
> 30-60 second operation.  Once you do it, you'll go "I can't believe
> it's that easy!"  :)
>   
>> Seems strange to me that the database doesn't have something akin to a
>> slave server ID and a simple command to remove everything related to
>> that server ID. I guess not though.
>>     
> It's not myth's fault, it's just how databases work.  You can't reset
> the counter on the whole table without truncating th table.

Right.  Plus--even if you don't care about resetting the counter--the 
application (Myth) manages data integrity, not the database, so you need 
to use the application to ensure all the data is deleted properly.

And, the only qualification to the, "Just 'Delete all capture cards' and 
don't worry about video sources," is that if you have a video source 
that applied /only/ to the HDHR you're removing, then you should also 
Delete all video sources.  Having an unattached video source isn't 
really a supported configuration (and can cause everything to just fail 
at some "random" point in the future--i.e. it appears to work, now, but 
at some point all your recordings just stop working).

Note, also, that the recording rules are not associated with the source, 
per se.  If you've done your rules right (i.e. /never/ use "this 
channel" rules), then the rules stand on their own--no matter what 
happens to your video sources/lineups/callsigns/...  If, however, you 
used "this channel" rules, then your rules are dependent on callsigns, 
so if you change callsigns, you'll have to either a) change all "this 
channel" rules to "any channel" rules*** or b) delete and re-create the 
rules.

***And, if you're /really/ concerned about continuing to do it wrong, 
change them back to "this channel" rules by finding an upcoming 
recording (on the desired channel--by callsign) with the "any channel" 
rule and then editing it to make it a "this channel" rule.

That being said, even though it's a lot quicker and less painful than 
most would think, it makes sense to wait until you have a /lot/ more 
time than you think you may need to do the job.  Or, at least wait until 
the next couple of recordings are ones you don't care a lot about.

Mike


More information about the mythtv-users mailing list