[mythtv-users] Multiple hostname changes on DB restore?

Michael T. Dean mtdean at thirdcontact.com
Tue Nov 29 18:05:14 UTC 2011


On 11/29/2011 04:51 AM, Andrew Cranwell wrote:
> I'm currently importing the database from my old BE/FE and am at the
> point of updating the hostname; however, at some point in the distant
> past, I changed the hostname of the old backend without properly
> updating the database (yes, everything broke and I won't do it again).
>
> Is it "safe" to run `mythconverg_backup.pl --change-hostname` twice
> (once with each old hostname)? I tried it and got errors about duplicate
> values, so I'm hesitant to proceed with that unless told it's safe.
>
> Or should I try fixing the damage on the old BE and re-export/re-import
> the DB?

You'll need to re-restore the database you had before you started doing 
the --change-hostname process.

With --change-hostname, it's critical that the host name you select is 
one that has never been used before.  There's no way to "merge" 2 
different host names to a single name.

With more details on the existing and desired names (and which should 
map to which name), I could give you an exact procedure, but the most 
challenging to figure out process would be getting an old definition of 
a host name (say, myhost) out of the way and changing an old host name 
(say oldhost) to be your good hostname (myhost).  For that, you need to 
use a temporary "garbage" name.  So:

myhost: old host name that was used before, but no longer has proper 
settings
myhost: desired host name to use, but with proper settings
oldhost: old host name that was used before with the proper settings for 
(new) myhost

mythconverg_restore.pl --change_hostname --old_hostname="myhost" 
--new_hostname="garbage"
mythconverg_restore.pl --change_hostname --old_hostname="oldhost" 
--new_hostname="myhost"

Then just ignore "garbage"--unless the old myhost (now garbage) was a 
backend host name and you actually recorded shows using that backend and 
you've now moved those shows to another host, or you configured capture 
cards/input connections or storage groups on that backend.  Then, you 
would need to "retire" that backend (as described at 
http://www.mythtv.org/wiki/Backend_migration ).

Mike


More information about the mythtv-users mailing list