[mythtv-users] DB manipulation

Daryl McDonald darylangela at gmail.com
Thu Aug 7 13:23:34 UTC 2014


On Wed, Aug 6, 2014 at 5:38 PM, Daryl McDonald <darylangela at gmail.com>
wrote:

>
>
>
> On Tue, Aug 5, 2014 at 5:25 PM, Mark Perkins <perkins1724 at hotmail.com>
> wrote:
>
>>
>>
>> On 6 Aug 2014, at 1:25 am, "Daryl McDonald" <darylangela at gmail.com>
>> wrote:
>>
>>
>> On Aug 5, 2014 12:22 AM, "Michael T. Dean" <mtdean at thirdcontact.com>
>> wrote:
>> >
>> > On 08/04/2014 05:58 PM, Doug Lytle wrote:
>> >>
>> >> Daryl McDonald wrote:
>> >>>
>> >>> Would it work to create the backup, restore it to the new system,
>> then "mythconverg_restore.pl <http://mythconverg_restore.pl>
>> --change_hostname --old_hostname="XXXX" --new_hostname="YYYY" it?
>> >>
>> >>
>> >> Yes
>> >
>> >
>> > Iff you run the --change_hostname before you run any MythTV application
>> at all on the new system, and iff you have never run any MythTV application
>> on any system that used the new same host name as the new host name.
>> >
>> > Mike
>> >
>> > _______________________________________________
>> > mythtv-users mailing list
>> > mythtv-users at mythtv.org
>> > http://www.mythtv.org/mailman/listinfo/mythtv-users
>> > http://wiki.mythtv.org/Mailing_List_etiquette
>> > MythTV Forums: https://forum.mythtv.org
>>
>> I'm guessing that you are saying that since I've set up the BE and added
>> scripts etc., it won't work because I have already created a Db. In that
>> case, would I have to drop the current Db before restoring the previous
>> system's Db?
>> Daryl
>>
>> _______________________________________________
>>
>>
>> No, when a system (frontend or 'slave' backend) first connects to the
>> master backend the master backend populates a heap of default settings into
>> the database which are all keyed off the host name. They will essentially
>> remain in the database for ever. What the --change_hostname command does is
>> change all the settings from an old hostname to a new hostname. However if
>> the new hostname has already been used (at some time in the past) then the
>> --change_hostname command would result in some settings being duplicated
>> which is not permitted under the database rules so the change would fail.
>>
>> I guess that the script fails gracefully (ie checks if the proposed new
>> hostname has been used before and refuses to proceed if it has) rather than
>> getting half way through and then corrupting your database but either way
>> make sure you have a known good backup of your database and keep it some
>> place very safe....
>>
>> If you have been able to successfully restore your database during your
>> testing so far then just keep doing whatever you have been doing to restore
>> the database. Just make sure that no myth% program runs on the new system
>> and touches the database before the change hostname script has been run.
>> Note MySQL will need to be running with the database restored for the
>> script to work.
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>
>
> Looks like the weekend is when I'll get my window of opportunity to make
> my changes. What I'm hearing is that it'll be all good if the very next
> thing I do after restoring the old Db to the new system is to rename it
> according to the new system's local hostname, right?
>
> Does anyone know why my previous OS upgrade attempts always resulted in a
> warning "unable to use any stored monitor configurations" and a blank
> screen? I used the terminal to get the update manager to offer the dist
> upgrade, but no joy!
> Daryl
>
>
The weekend came early, that is plans changed, and I tried the change
hostname command, and am baffled with the following result :

daryl at daryl-A780L3C:~$ mythconverg_restore.pl
<http://mythconverg_restore.pl>--change_hostname
--old_hostname="daryl-A780L3C" --new_hostname="TriMyth"
bash: http://mythconverg_restore.pl: No such file or directory
daryl at daryl-A780L3C:~$

any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140807/4df93da9/attachment.html>


More information about the mythtv-users mailing list