• Register
    • Login
    • Search
    • Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Exporting Host Info from old Fog Server to new Fog server

    FOG Problems
    2
    11
    3506
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      willgabay1984 last edited by

      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

      1 Reply Last reply Reply Quote 0
      • C
        chad-bisd Moderator last edited by

        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


        If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

        1 Reply Last reply Reply Quote 0
        • W
          willgabay1984 last edited by

          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]

          1 Reply Last reply Reply Quote 0
          • W
            willgabay1984 last edited by

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

            1 Reply Last reply Reply Quote 0
            • C
              chad-bisd Moderator last edited by

              without the brackets.

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


              If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

              1 Reply Last reply Reply Quote 0
              • W
                willgabay1984 last edited by

                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

                1 Reply Last reply Reply Quote 0
                • C
                  chad-bisd Moderator last edited by

                  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.


                  If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                  1 Reply Last reply Reply Quote 0
                  • W
                    willgabay1984 last edited by

                    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

                    1 Reply Last reply Reply Quote 0
                    • C
                      chad-bisd Moderator last edited by

                      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.


                      If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                      1 Reply Last reply Reply Quote 0
                      • W
                        willgabay1984 last edited by

                        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]

                        1 Reply Last reply Reply Quote 0
                        • C
                          chad-bisd Moderator last edited by

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


                          If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post

                          58
                          Online

                          10.4k
                          Users

                          16.4k
                          Topics

                          150.7k
                          Posts

                          Copyright © 2012-2023 FOG Project