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

Migrating Hosts to New Server

Scheduled Pinned Locked Moved Solved
FOG Problems
3
11
1.0k
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.
  • C
    Critchleyb
    last edited by Mar 27, 2019, 4:29 PM

    Hi,

    I’m trying to migrate my host list to a new server.

    I’ve attempted to export the CSV from the old server, however it puts the CSV in a format that seems broken.

    Some of the hosts, the MAC hasn’t exported at all, on the ones that it has, it hasn’t put in any semi colons, so FOG refuses to import them.

    I have around 700 hosts and it’s not viable to manually enter the semi colons. I also want to avoid exporting the entire database as there are a lot of different configuration settings on my new server as its a different network environment.

    Any advice appreciated.

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Mar 28, 2019, 9:33 AM

      @Critchleyb Just noticed that I have overlooked something myself. You’ll need to export and import MAC address table (don’t forget the MAC address association table).

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      C 1 Reply Last reply Mar 28, 2019, 10:09 AM Reply Quote 1
      • G
        george1421 Moderator
        last edited by george1421 Mar 27, 2019, 11:15 AM Mar 27, 2019, 5:15 PM

        What version of FOG going to what version of FOG?

        Is the function broken on the export or import side?

        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!

        1 Reply Last reply Reply Quote 1
        • C
          Critchleyb
          last edited by Mar 27, 2019, 5:17 PM

          Old version was 1.5.0-RC-2

          Trying to import to 1.5.5.

          I believe the export is what is causing the issue. Has this been tweaked in a later version?

          G 1 Reply Last reply Mar 27, 2019, 5:34 PM Reply Quote 0
          • G
            george1421 Moderator @Critchleyb
            last edited by Mar 27, 2019, 5:34 PM

            @Critchleyb I can’t say for sure. Probably yes since you are even on a RC release.

            I was going to recommend a database way to exporting the table, but then I remembered about table dependencies.

            So in stead I would recommend that you bring your old FOG server up to 1.5.5. Realize it will function differently than 1.5.0rc2. But the goal is to get the export to work correctly.

            1. Export your Image definitions first
            2. Migrate the images raw files (/images) to your new FOG server
            3. Import your images.csv into your new fog server
            4. Export your hosts definitions from the old fog server.
            5. Import the host definitions into your new FOG server.

            If you can’t upgrade your old fog server for some reason then can you show us what is doing to the csv file to make it unusable?

            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!

            1 Reply Last reply Reply Quote 1
            • C
              Critchleyb
              last edited by Mar 27, 2019, 5:45 PM

              Thanks, I’ll try that when i’m back in the office tomorrow.

              Thankfully I don’t need to transfer the images over, so its a little simpler.

              The old server is in use by another team and still needs to carry on working. But hopefully i’ll be able to update it without issues.

              1 Reply Last reply Reply Quote 0
              • C
                Critchleyb
                last edited by Mar 27, 2019, 5:50 PM

                I also attempted to export the database following this guide but just for the hosts table:

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

                using

                Old Server:

                mysqldump fog hosts > hosts.sql
                

                New Server:

                mysql fog < hosts.sql
                

                But no luck with that, it exported fine but when i tried to import no data showed in the web portal.

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Mar 27, 2019, 8:08 PM

                  @Critchleyb said:

                  Some of the hosts, the MAC hasn’t exported at all, on the ones that it has, it hasn’t put in any semi colons

                  Can you give us a couple of lines of examples on this. Possibly we can make a bit more sense of this. Without knowing what exactly the export looks like, it’s hard to help.

                  mysqldump fog hosts > hosts.sql

                  Sounds like a valid road to go but I am wondering what the hosts.sql actually looks like after the export. See if you have any entries in the hosts table after the import: mysql -e 'SELECT COUNT(*) FROM hosts' fog

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  C 1 Reply Last reply Mar 28, 2019, 9:28 AM Reply Quote 1
                  • C
                    Critchleyb @Sebastian Roth
                    last edited by Mar 28, 2019, 9:28 AM

                    @Sebastian-Roth

                    Hello,

                    Seems like the data was imported. Count * shows 1193 entries in the table.

                    No data showing in the hosts list on the web portal however.

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Sebastian Roth Mar 28, 2019, 3:31 AM Mar 28, 2019, 9:30 AM

                      @Critchleyb Default view in the hosts list is search and does not show any hosts! Sure you clicked on the “List all hosts” link in the left menu? Just wanna make sure.

                      You can change the default view to list instead of search in FOG Configuration -> FOG Settings …

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by Mar 28, 2019, 9:33 AM

                        @Critchleyb Just noticed that I have overlooked something myself. You’ll need to export and import MAC address table (don’t forget the MAC address association table).

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        C 1 Reply Last reply Mar 28, 2019, 10:09 AM Reply Quote 1
                        • C
                          Critchleyb @Sebastian Roth
                          last edited by Mar 28, 2019, 10:09 AM

                          @Sebastian-Roth

                          Sorted!

                          As soon as i imported the hostMAC table they all appeared in the web portal.

                          For anybody reading in the future:

                          To Migrate just your Host list, you will need to export both the “hosts” and “hostMAC” tables from the old database using mysqldump, then import them both into the new database. Just doing the hosts table will not make them show in the web portal.

                          1 Reply Last reply Reply Quote 1
                          • 1 / 1
                          1 / 1
                          • First post
                            10/11
                            Last post

                          310

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project