[mythtv-users] easiest way to rename a myth host
Michael T. Dean
mtdean at thirdcontact.com
Mon Jan 5 15:23:57 UTC 2009
On 01/04/2009 09:26 PM, Craig Sanders wrote:
> On Mon, Nov 17, 2008 at 08:05:25PM -0500, Michael T. Dean wrote:
>
>> On 11/17/2008 08:01 AM, Stefan G. Weichinger wrote:
>>
>>> What procedure would you recommend?
>>>
>>> Migrate the backend to the new hardware by following this:
>>>
>>> http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7
>>>
>> I'd recommend
>> http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore .
>> The scripts can do backup and restore, and support changing hostname
>> without using the "partial" restore described by the link above
>> (though they do support partial restores, too).
>>
>
> is there any real need to do a complete dump
To make sure you have a fallback for when things go wrong... (Though
this is completely optional as...)
> and restore
You don't do a restore to change hostname. The script changes it
(correctly) on the "live" database, as you can see in the referenced
instructions on the wiki page:
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore#Change_the_hostname_of_a_MythTV_frontend_or_backend
"Note that changing the hostname is performed on an existing database
and does not restore a database."
> to rename a
> host? wouldn't it be simpler just to issue the appropriate mysql SQL
> commands to update the relevant records?
>
> i've been looking into how to do this today because i set up myth a
> few months ago with the FQDN of my machine rather than just the short
> hostname. it's no big deal, but it annoys me. I'd like to rename the
> hostname in myth from 'ganesh.taz.net.au' to just plain 'ganesh'.
>
> AFAICT, all that's needded is:
>
> 1. edit /etc/hostname, change to just plain 'ganesh'.
> 2. run 'hostname ganesh'.
> 3. exit the frontend if it's running.
> 4. /etc/init.d/mythtv-backend stop
> 5. run the 'rename-myth-host.pl' script (see below)
> 6. /etc/init.d/mythtv-backend start
>
>
> i haven't run it yet, in case there's something i'm missing about
> how myth works or the database structure.
There's a bit more to it than what's in your script, but if you look at
the mythconverg_restore.pl script you'll see it uses a very similar
process then does the rest. The /whole/ reason for putting the host
rename into mythconverg_restore.pl is because we have too many contrib
scripts that don't get maintained, so we didn't want another
single-purpose script.
Mike
More information about the mythtv-users
mailing list