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

    Mass export host information

    Scheduled Pinned Locked Moved
    FOG Problems
    4
    9
    6.6k
    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.
    • apathetic_adminA
      apathetic_admin
      last edited by

      It’s entirely possible that this has been answered before, but I couldn’t find it. I am building a new FOG server, and I’d like to migrate the host information over from the old one. I know there’s a way to import them from a .csv file, but is there a way to export the list of hosts? They are both version 0.32.

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

        Yes. Do you want just the hosts, or do you want to carry over the Hardware Inventory, Image Definitions, and other information too?


        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
        • apathetic_adminA
          apathetic_admin
          last edited by

          I suppose all the information would be helpful. The images are gone, so I’m going to have to rebuild them all, but that’s fine.

          1 Reply Last reply Reply Quote 0
          • apathetic_adminA
            apathetic_admin
            last edited by

            I’ve exported the hosts table from mysql, but the string for each host has a lot of information that isn’t accepted by the csv import. 😞

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

              To export:
              [CODE]#mysqldump -u root -p[password] fog hosts > hosts.sql[/CODE]
              To import
              [CODE]#mysql -u root -p[password] fog < hosts.sql[/CODE]

              Or you can export the entire database, just leave off the table names in the mysqldump line. And import the entire database to the new server. Then all you have to do is update the settings in the webUI depending on if you changed IPs or passwords.


              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
              • apathetic_adminA
                apathetic_admin
                last edited by

                Good deal.

                1 Reply Last reply Reply Quote 0
                • J
                  Jhowzr
                  last edited by

                  Is there a way to consolidate hosts onto one server? I would like to retain all of the Hardware Inventory, Image Definitions, and other information from a test system and import those systems into an existing Fog server. I don’t want to lose the hosts that are currently in the system though. Won’t your #mysql -u root -p[password] fog < hosts.sql command drop all of the current tables? Or, will it just add to the list?

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

                    Jhowzr, please start your own thread since your issue/request is different, just to keep things clean. Please include all relevant information. You may reference this thread in your own thread.


                    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
                    • Wayne WorkmanW
                      Wayne Workman
                      last edited by

                      For future readers: https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

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

                      164

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project