Change the hostname of a MythTV frontend or backend
Before changing the hostname of a MythTV frontend or backend, make sure you create a good database backup, so that you can get back to a known state if things go wrong.
When changing the hostname of your system, you must perform the following actions before you start any MythTV programs. If you start a MythTV program before modifying the hostname in the database, the program will create new entries with the new hostname, meaning that the following procedure is likely to fail because of duplicate entries.
It is also critical to ensure you do not change the name of a host to the name of another already-existing host in the database--doing so will cause duplicate entries. Instead, if necessary, run the command below multiple times, using a temporary "placeholder" hostname to ensure the different hosts are not improperly merged.
Note that changing the hostname is performed on an existing database and does not restore a database. Therefore, to change a hostname, ensure that the database exists (restore an old database, as above, if necessary) and execute the following command, replacing "XXXX" and "YYYY" with appropriate values for the old and new hostnames, respectively:
mythconverg_restore.pl --change_hostname --old_hostname="XXXX" --new_hostname="YYYY"