LinHES Forums http://forum.linhes.org/ |
|
Changing hostname http://forum.linhes.org/viewtopic.php?f=6&t=8048 |
Page 1 of 2 |
Author: | marc.aronson [ Mon Jan 23, 2006 1:30 am ] |
Post subject: | Changing hostname |
I just installed a second myth server and I made the mistake of not changing it's name, so I have two machines with the name "mythtv" on my network. I want to change the name of the new one. I tried modifying "/etc/hostname" with the new name and rebooting, but after a reboot the backend process didn't start properly and I had the following error on the myth log file: Quote: 2006-01-22 22:33:05.584 New DB connection, total: 1
No setting found for this machine's BackendServerIP. Please run setup on this machine and modify the first page of the general settings. 2006-01-22 22:42:56.323 New DB connection, total: 1 No setting found for this machine's BackendServerIP. Please run setup on this machine and modify the first page of the general settings. I re-ran the setup program and it didn't show an tuner cards anymore, so I've set the hostname back to "mythtv" for now. Is there a way I can do this rename without messing things up? Thanks! Marc |
Author: | cesman [ Mon Jan 23, 2006 1:52 am ] |
Post subject: | |
Perhaps reading the MythTV docs? Settings in the db are associated with hostname. So if you change the hostname, you must reconfigure or read the MythTV docs... |
Author: | Xsecrets [ Mon Jan 23, 2006 8:23 am ] |
Post subject: | |
also there are some threads on this forum about how to do it. Basically it's a very messy process. |
Author: | Ralph [ Mon Mar 06, 2006 5:39 am ] |
Post subject: | |
What about doing an Upgrade (or just using the currently installed version, but selecting 'Upgrade' from the boot menu) and then choosing a hostname other than 'mythtv' when prompted? Would that modify the backed-up database appropriately, as part of the upgrade process? And if not, what would the outcome be, eg. a total mess... ![]() |
Author: | cesman [ Mon Mar 06, 2006 7:39 am ] |
Post subject: | |
Read my original statement. |
Author: | randomhtpcguy [ Sun Mar 26, 2006 7:46 pm ] |
Post subject: | same problem here |
i have the same problem. I think it could be behind all my problems with the backend slave how-to. |
Author: | Ralph [ Sun Mar 26, 2006 8:23 pm ] |
Post subject: | |
![]() Quote: Fixed by entering mysql and setting the host name to the hostname of my backend (the installed default of "mythtv")
Code: root@mythtv:/var/log/mythtv# mysql -u root mythconverg mysql> UPDATE recorded SET hostname='mythtv'; |
Author: | tjc [ Sun Mar 26, 2006 10:43 pm ] |
Post subject: | |
Not good enough. Seriously. I have done this in the past by editing the DB dump created by backup. It's a big ugly job and it's really easy to screw up. It may take multiple tries to get it right. Still that's the easiest way. Reading the MythTV docs will give you the information you need to do this intelligently. BTW - Why is getting people to read the manual harder than getting a pill into a cat? We're not telling you to RTFM just for fun. It contains information that you need to do this. Anything we told you would be either incomplete or essentially copying the contents of the manual. Both of which would be pretty silly things for us to do. |
Author: | randomhtpcguy [ Mon Mar 27, 2006 10:08 pm ] |
Post subject: | |
The instructions regarding how to change the hostname in the manual are very clear although i haven't tried it. I think there is some mysticism preventing people from trusting TFM because they get used to knoppmyth (thanks to other users and developers) taking care of all of the details for them and don't know if TFM still applies to a customized distribution. How customized is it we don't know so when in doubt we just use all the defaults and cross our fingers. Next check out the wiki, then these forums, then mythtv wiki, then last the mythtv docs... then post a question here. Its hard for people to transition from handholding during the install to crawling and then walking on their own. But if you want to try new things like multiple systems its a new level of complexity and risk but that curiosity requires more independent research and trying first what is written. Before I even think about changing the hostname I am going to get to know the database better. I have been using phpmyadmin to fix the channel table with my dvb settings and it has been a good learning experience. |
Author: | cesman [ Mon Mar 27, 2006 11:20 pm ] |
Post subject: | |
MythTV is in NO way customized for KnoppMyth. There is no reason to think that what is pointed out in the MythTV manual won't work the same for KnoppMyth. Since starting the distribution, I've advocated reading the MythTV docs. While KnoppMyth makes some items easier, not reading the docs for the various apps included is no excuse. This is especially true is I tell you to read the docs. |
Author: | bruce_s01 [ Wed Oct 18, 2006 3:21 pm ] |
Post subject: | |
Follwed the instructions in Section 23.15 of the MythTV docs, everything seems to have went OK. In the MythTV docs acessable from Knoppmyth ( http://knoppmythbox/mythtv-doc/mythtv-H ... .html#ss23 ) web interface, there appears to be a slight correction required to the backend stop and start instructions, instead of : Code: $ su # /etc/init.d/mythbackend stop it needs to be: Code: $ su
# /etc/init.d/mythtv-backend stop and the the same for the start, of course. |
Author: | BluesBrian [ Tue Oct 02, 2007 1:13 am ] |
Post subject: | |
bruce_s01 wrote: Follwed the instructions in Section 23.15 of the MythTV docs, everything seems to have went OK.
Link: http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.15 |
Author: | jmckeown2 [ Tue Oct 02, 2007 8:58 am ] |
Post subject: | |
I accidently renamed when I rebuild my FC 4 box with KM I didn't realize FC added ".localdomain" ...worst upgrade ever. (not KM's fault of course) I tried all sorts of stuff to get the backup 'corrected' and reimported and failed every time. I eventually took the dumps, and wrote a monster of a grep/sed/awk script (I wish I knew perl) that eventually got the recording data inserted into videometadata instead of the recordings tables, I moved the files from the FC4 recordings folder into KM's /myth/videos and was able to watch my old recordings through mythvideo. YMMV. |
Author: | tjc [ Tue Oct 02, 2007 8:39 pm ] |
Post subject: | |
I wrote an experimental SQL script to do this the problem was finding someone with time and an opportunity to test it.... Maybe I'll post it with the caveat that it's untested and needs someone desperate or crazy enough to try it... |
Author: | tjc [ Tue Oct 02, 2007 8:44 pm ] |
Post subject: | Repost... Caveat Utor! |
Insert blood curdling warning here. I _believe_ that this is correct, but it's utterly untested. Make sure you have a current DB backup before you even think about trying this. Use at you own risk... Anybody have a sacrificial machine handy to try this on? Thx... BTW - If you grab this remember to watch out for trailing blanks after the three \ continuation lines... Code: root@black2:~# cat change_hostname.sh
#!/bin/bash old="$1" new="$2" fatal () { echo "Error! $*" exit 1 } nl=' ' usage () { fatal "$*${nl}Usage: $0 old_hostname new_hostname" } [ $(id -u) -ne 0 ] && fatal "You must run this script as root!" [ $# -ne 2 ] && usage "Bad argument count!" [ -z "$old" ] && fatal "Old hostname can not be blank!" [ -z "$new" ] && fatal "New hostname can not be blank!" echo echo "=============================== WARNING! ==============================" echo "This only changes the hostnames stored in the database. Also, if mysql" echo "complains about uniqueness you'll need to resolve the issue manually." echo "=============================== WARNING! ==============================" echo read -p "Hit enter to continue, or Ctrl-C to abort." # Tables which contain hostname for table in capturecard inuseprograms jobqueue jumppoints keybindings \ music_playlists musicplaylist profilegroups recorded settings ; do mysql mythconverg -u root -e \ "update $table set hostname = '$new' where hostname = '$old'" done # Tables which contain host for table in mythlog ; do mysql mythconverg -u root -e \ "update $table set host = '$new' where host = '$old'" done |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |