[mythtv-users] Multiple hostname changes on DB restore?
andrew.cranwell at gmail.com
Tue Nov 29 22:11:03 UTC 2011
On 11/30/2011 4:35 AM, Michael T. Dean wrote:
> 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
> 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"
> mythconverg_restore.pl --change_hostname --old_hostname="oldhost"
The original hostname was "myth-primary-backend", and at some point it
was changed to "myth-primary-backend.home". The new hostname is "myth2011".
> 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 ).
Since it's a replacement for the old backend, is there any way to ditch
all the sources/inputs, settings, etc. and only import the recordings?
It's also a migration from 0.21 to 0.24, so the less old cruft the
better (I took a backup of the clean 0.24 DB before I started).
More information about the mythtv-users