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

    Upgrading from FOG 0.32 to 1.3.x

    Scheduled Pinned Locked Moved
    General
    3
    10
    3.8k
    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.
    • M
      madeyem
      last edited by

      Hi everyone,

      I’m currently on

      • Ubuntu Server 10.04.
      • FOG 0.32

      and would like to upgrade to

      • Ubuntu Server 16.04.
      • FOG 1.3.0 or even 1.3.1
      • while keeping the hosts and images from 0.32

      I’m looking for best practice tips to do that. I do have a VM to test it all with. This VM is not my actual FOG server, so no worries here. I already read on the wiki that it is recommended to freshly install Ubuntu instead of upgrading. Has anyone successfully upgraded Ubuntu and FOG instead of a fresh installation?

      Would the following procedure work?

      1. Export hosts and images from FOG 0.32
      2. Uninstall/purge FOG 0.32
      3. Upgrade to Ubuntu 16.04
      4. Install FOG 1.3.x
      5. Import hosts and images from FOG 0.32

      Should I go with FOG 1.3.0 or directly to 1.3.1 RC?

      Any other tips?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        If you have the resources, just spin up a new clean instance of ubuntu 16.04 and FOG 1.3.1-RCx instead of upgrading your existing server.

        The logic here is two folder.

        1. You are versioning over a large gap both for ubuntu and FOG. This can be done, but you will spend more time rolling the OS from 10.04 to 16.04 than just spinning up a new server.
        2. If something happens during the upgrade you will loose access for imaging. Keeping your legacy FOG server functional will give you a working FOG system while creating your new FOG server.

        You can move the images between fog servers OK, but unless you have a huge number of fog clients, you would be better served by just recreating the hosts in your new fog server instead of copying the DB over. Also with the images created with 0.3x, you would be better served by converting them to the newer FOG 1.3.x format. This will save on deployment times since the new format deploys quite a bit faster than the old format.

        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 4
        • 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 1
          • M
            madeyem
            last edited by

            I now have a VM with Ubuntu Server 16.04. and FOG 1.3.2 for testing.

            I exported the hosts from 0.32 (via MYSQL dump) and imported them into 1.3.2. If I go into the fog database from the command line, I can see, that the hosts are actually there (names, MACs, descriptions etc.), but in the FOG web interface no hosts are showing („0 results found“). Any ideas?

            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman @madeyem
              last edited by

              @madeyem There’s some maintenance commands for cleaning out junk data - this might help you, it couldn’t hurt. They are here: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL#Hosts_think_they_are_not_registered_.2F_can.27t_register_.2F_Already_Registered_.2F_other_registration_weirdness

              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/

              M 1 Reply Last reply Reply Quote 0
              • M
                madeyem @Wayne Workman
                last edited by

                @Wayne-Workman

                The command

                DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC`);
                

                deleted all hosts I had imported, so I guess there is something wrong with the hostIDs? Any idea how I can fix this while importing hosts from 0.32?

                1 Reply Last reply Reply Quote 0
                • M
                  madeyem
                  last edited by

                  By this time, I’m pretty sure, that the problem lies in the different database structures in FOG 0.32 and 1.3.x. After I imported the hosts from 0.32, not only are they not listed on the web interface, but I also can’t add a host manually anymore, so the import from 0.32 apparently messes up the databases somehow. I installed phpmyadmin to check the databases after the import and the field hmHostID from hostMAC is completely empty. If you add a host manually (it works before the import), this is not the case and it shows up properly on the web interface.

                  I guess, as long as someone doesn’t write something up, that particularly makes it possible to import from the old into the new database structure, we won’t be able to successfully import the hosts from 0.32.

                  If someone comes up with a way, that is working, please share.

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman @madeyem
                    last edited by Wayne Workman

                    @madeyem said in Upgrading from FOG 0.32 to 1.3.x:

                    By this time, I’m pretty sure, that the problem lies in the different database structures in FOG 0.32 and 1.3.x.

                    I don’t think so. FOG 1.3.0+ has code in it to upgrade any previous version of the database to the current version.

                    If you’re only exporting a single table, that would explain why it’s not working. Grab the entire database, the commands are in the link I posted earlier.

                    I guess, as long as someone doesn’t write something up, that particularly makes it possible to import from the old into the new database structure, we won’t be able to successfully import the hosts from 0.32.

                    The link I posted earlier is a complete tutorial for migrating 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/

                    M 2 Replies Last reply Reply Quote 0
                    • M
                      madeyem @Wayne Workman
                      last edited by

                      @Wayne-Workman

                      Ok, I will try and report back.

                      1 Reply Last reply Reply Quote 0
                      • M
                        madeyem @Wayne Workman
                        last edited by

                        @Wayne-Workman

                        I have to take back, what I said earlier.
                        When I first tried to migrate the database, I apparently did something wrong while exporting the db, because the size of the dump wasn’t nearly as big as it is now, when I tried it again. I now was able to successfully import the database and I have hosts, image definitions and users showing up properly in the web interface.

                        The next step is to perform all of this on my actual FOG server, as this was only a test with a VM.

                        Thanks for the help everyone!

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

                        158

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project