[mythtv-users] Stuffed change of hostname

Michael T. Dean mtdean at thirdcontact.com
Mon Jan 20 13:25:31 UTC 2014


On 01/20/2014 04:38 AM, Mark Perkins wrote:
> A little while ago (a few months now) I migrated my backend which 
> involved a change of host name. I thought I was very clever and 
> followed the wiki instructions to the 'T'. I did not. I have sat in 
> the naughty corner for an appropriate period of time and now need to 
> get things fixed.
>
> I realised that I stuffed the host name change a couple of days ago 
> when trying to reset mythvideo. I have now got that sorted - by fixing 
> (replacing old host name with new host name) all the incorrect host 
> name entries in the appropriate table.

I need to know exactly what approach you tried before I can suggest how 
best to clean up the problems.

> However I have had a few recording rules that have not been correctly 
> displaying metadata (fanart / coverart) and on a hunch I looked in the 
> relevant table - sure enough incorrect host name entries. I cleared 
> them up (deleted this time as there appeared to be correct entries 
> against the correct host this time) and all the problematic metadata 
> now correctly appears.
>
> For clarification, the old host / host name does not meaningfully 
> exist as a computer and is unlikely to ever again.
>
> So my question is - in general if there is a database record that has 
> the incorrect host name can I simply delete the record. Or am I simply 
> setting myself up for new problems?
>
> Obviously the main risk is loss of data - however I "assume" that myth 
> has created new records with the correct hostname for essentially 
> anything it needs to run correctly because other than a few wonky 
> pieces of metadata I haven't come across the problems that this is 
> invariably (will invariably) cause.

Because records in different tables are linked to other records in other 
tables, just deleting things out of the database directly is /always/ a 
bad idea unless you completely understand the MythTV database schema, 
its data constraints, etc.  There are other ways to clean up problems, 
but I'd need more information to suggest an appropriate approach.

> For further clarification - all my recordings have the correct host 
> name. Apparently I followed enough of the wiki to at least get that 
> correct.
>
> Looking in the settings table I can see that there are hostname 
> entries for some test frontends that no longer exist as well, looking 
> to clean those up in the same way at the same time if I can / is 
> appropriate / is advisable.

There's no real benefit to doing so, as it will save only approximately 
8kB or less of HDD storage per host name (and nothing more).  Eventually 
we'll have a profile manager that lets you clean things up/rename 
things/etc. much better.

Mike


More information about the mythtv-users mailing list