Exporting Host Info from old Fog Server to new Fog server



  • Hello, I need a very, very basic breakdown for exporting host information from an old fog server to the new fog server. I found this thread ([url]http://fogproject.org/forum/threads/mass-export-host-information.902/[/url]), but not sure how to start and if this is the way to do it now. Seems you can import a .csv file, but no easy way to export. Can anyone help provide me these steps? The Ubutu OS is something I am still getting aquinted with.

    Will


  • Moderator

    The # is the prompt indicator. If I told you to run a command in windows like c:>ipconfig /release, would you type the c:>? o_O



  • I got it. I ran the exact line you had, but took the # off. So this is what worked: [FONT=Consolas]mysql -u root -p[password] fog < hosts.sql[/FONT]

    [FONT=Consolas]I want to thank you for your fast and helpful responses. You do an excellent job on this site! Keep up the good work…[/FONT]

    [FONT=Consolas]Will[/FONT]



  • Its in my Home directory. With folders like desktop, documents, music, pictures. Then there’s the hosts.sql file with them.


  • Moderator

    without the brackets.

    Where did you put the file in the GUI? Was it in your home directory or on your Desktop or what?



  • Yes, my new server has a root password. Lets say its football. Im assuming I would need to put: [B]-p[football][/B] right? or just [B]-pfootball[/B] with no brackets?

    Also, Im not sure how to run the command from that specifric directoy. Im opening terminal and it shows gala@FOGvirtual:~$. I tried cd home, cd desktop but all comes back with “No such file or directory”. I know its something easy here but Im not so familiar with using terminal here.

    Will


  • Moderator

    does your mysql root user have a password? If not, then remove the -p[password] from the command.

    You need to run the command from the directory that contains the hosts.sql file.



  • Ok - so I got the host.sql file from the old server onto my new server. I pasted it in the same location where I got the old file from. I go to [B]file system[/B]–>[B]home[/B]–>[B]gala[/B] and my file is there. I opened terminal and on the line is this code: [B]gala@fogvirtual:~$ #mysql -u root -p[password] fog < hosts.sql[/B]…Do I have it setup looking in the wrong directory? I figured I could run that, then open my Fog Managment page and they would all show? Sorry to be so off on this, but Im so close

    Will


  • Moderator

    From the old fog server, run the command from the command line. Replace [password] with your msqyl root user password, if there is one at all. You can try it without the -p[password] and see if it works.

    It puts the file into the current directory. the “>” is a redirect to a file, which since we didn’t tell it a folder to go to, goes to the current one.

    Copy the resulting hosts.sql file over to the new fog server.

    From the command line on the new fog server. run the mysql command from the directory where you stored your hosts.sql file. Again, you may not need the -p[password] argument if you didn’t set a mysql root user password.



  • I added one new host to the new Fog server. I have aroud 200 hosts on old Fog server. I read that thread but I’m needing more of a breakdown - do I open terminal and just add [FONT=Consolas][B]#mysqldump -u root -p[password] fog hosts > hosts.sql[/B]? Where will it go? Please elaborate for Im not familair with this… Its been a looooong time since setting this up. Thanks for your help as well![/FONT]

    [FONT=Consolas]Will[/FONT]


  • Moderator

    Yes, that thread is what you need. Does the new FOG server have any hosts defined yet?


Log in to reply
 

423
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.