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

Transferring all images & all host info from (1.2.0) to (1.2.0)

Scheduled Pinned Locked Moved Unsolved
FOG Problems
migrate upgrade move
3
27
5.4k
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.
  • D
    dcorpening
    last edited by Dec 7, 2016, 8:25 PM

    Server
    • FOG Version: 1.2.0
    • OS: Ubuntu 12
    Client
    • Service Version:
    • OS:
    Description

    Forgive me if this has been explained, but I cannot find specific directions on how to do this. I simply want to transfer all host information and images from an old box running FOG 1.2.0 on Ubuntu 12 to a newer box running FOG 1.2.0 on Ubuntu 14. Can someone please reply with ‘clear’ instructions (or a link to ‘clear’ instructions) on how to do this? I am a FOG newbie, so I echo again the word ‘clear’.

    T 1 Reply Last reply Dec 7, 2016, 9:30 PM Reply Quote 0
    • T
      Tom Elliott @dcorpening
      last edited by Dec 7, 2016, 9:30 PM

      @dcorpening export 1.2.0 db and import into the new server.

      Fog configuration page - configuration save

      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      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
      • W
        Wayne Workman
        last edited by Wayne Workman Dec 7, 2016, 9:45 PM Dec 8, 2016, 3:25 AM

        I can give more clear instructions - but they depend on if you’re going to recycle your old server’s IP or not. To be very honest, it’s much easier to not recycle the old IP address, and to have the two servers side-by-side during migration. Doing it this way is a snap (effort wise).

        To not delay you further, I’m assuming you will not recycle the old IP address.

        1. Install FOG 1.2.0 on the new box.

        2. Move the old database to the new server via the web interface. On the old server: Web Interface -> FOG Configuration -> Configuration Save -> Export and then take this file and go to the new server and Web Interface -> FOG Configuration -> Configuration Save -> Import

        3. Because you moved over the old DB, it will have the old server’s IP in the configuration. All these need changed to the new IP address. Here are the areas:

        • Update the IP address for the storage node on the FOG system where you changed the IP address Web Interface -> Storage Management
        • Update the IP address on a any master storage node that may reference this FOG server Web Interface -> Storage Management
        • (For master server) Update the FOG_WEB_HOST value Web Interface -> FOG Configuration -> FOG Settings -> Web Server -> FOG_WEB_HOST
        • (For master server) Update the FOG_TFTP_HOST value Web Interface -> FOG Configuration -> FOG Settings -> TFTP Server -> FOG_TFTP_HOST
          Reference: https://wiki.fogproject.org/wiki/index.php?title=Change_FOG_Server_IP_Address
        1. Copy your images from the old server to the new server, using NFS or SCP. I recommend SCP just because it’s so simple. On the NEW server, use this command where x.x.x.x is your old server’s address, you will be prompted for the fog user’s password. You can find this in the Storage Management -> node -> password area on your old server, and also inside /opt/fog/.fogsettings on the old server. This command will take a long time if you have a lot of images, and will not give a status while it’s working, so just be patient. You can look at bandwidth on the fog dashboard while this is going via the web interface if you like.
          scp -r fog@x.x.x.x:/images/* /images

        It’s possible that Ubuntu 12 will give you issues with ssh (because scp uses ssh). If you encounter these, refer to the reference below and use the NFS method.
        Reference: https://wiki.fogproject.org/wiki/index.php?title=Migrate_images_manually#Using_SCP

        1. Make sure permissions are good on the images:
          chown -R fog:root /images
          chmod -R 777 /images
          Reference: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_FTP#Permissions

        2. Change your DHCP server’s option 066 (or next-server if using Linux DHCP) to the new FOG server’s IP address.
          Reference: https://wiki.fogproject.org/wiki/index.php?title=Modifying_existing_DHCP_server_to_work_with_FOG

        Then, you should be done. Go try it out.

        #wiki worthy

        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
        • D
          dcorpening
          last edited by Dec 9, 2016, 2:48 PM

          Thanks Wayne Workman for the ‘clear’ instructions. (Since both servers are on the same network)…From the ‘new’ server only, I web browse to the ‘old’ server by 10.24.4.3/fog/management. Do a FOG Configuration -> Configuration Save -> Export and save the fog_backup.sql file to the New server’s Downloads folder. I then web browse to the ‘new’ server Fog interface: 10.24.4.4/fog/management. Then I do a FOG Configuration -> Configuration Save -> Import of the fog_backup.sql file. I get a “File Import successful! Database Added!” message. However, when I look at the FOG configuration of the new server (10.24.4.4), nothing is updated (i.e. storage management settings, tftp/active directory passwords, etc.) with the old server settings. What am I missing?

          W 1 Reply Last reply Dec 9, 2016, 6:08 PM Reply Quote 0
          • W
            Wayne Workman @dcorpening
            last edited by Dec 9, 2016, 6:08 PM

            @dcorpening Open the export file with something like notepad just to verify it’s not blank.

            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
            • W
              Wayne Workman
              last edited by Dec 10, 2016, 5:11 AM

              @Tom-Elliott do you have any input on this? I’ve never heard of anyone having this guy’s issue.

              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/

              D 1 Reply Last reply Dec 12, 2016, 3:56 PM Reply Quote 0
              • D
                dcorpening @Wayne Workman
                last edited by Dec 12, 2016, 3:56 PM

                @Wayne-Workman the export file is not empty. It appears to have all of the necessary information in it. I see the old server ip address, tftpd password, etc. in the file. BTW, I don’t think this matters, but the old server is running on Ubuntu 14 (not version 12 as I previously reported). So both boxes are running Ubuntu 14.

                W 1 Reply Last reply Dec 12, 2016, 11:57 PM Reply Quote 0
                • W
                  Wayne Workman @dcorpening
                  last edited by Wayne Workman Dec 12, 2016, 5:58 PM Dec 12, 2016, 11:57 PM

                  @dcorpening Ok, I’m going to give you steps to do it manually. For step #2, substitute all of the below:

                  Log into the new server, make sure ssh is installed and running:
                  apt-get install openssh-server -y;service sshd start

                  log into old server, open terminal, become root with sudo -i
                  Dump the db with:
                  mysqldump -D fog > fogdb.sql

                  Transfer the db to the new server, use a non-root account for below. The fog account should work fine (get credentials for it from new server’s web interface -> storage management -> [click node] -> password.
                  This is done on the old server, where x.x.x.x is the IP of the new server.

                  scp fogdb.sql fog@x.x.x.x:/home/fog/fogdb.sql

                  Log into the new server, open terminal. Become root with:
                  sudo -i
                  Go to fog home directory and import the DB:
                  cd /home/fog;mysql < fogdb.sql

                  If any of these steps gives you trouble, just ask for assistance here. Even if I’m not online, many folks here can help you with this.

                  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/

                  D 1 Reply Last reply Jan 6, 2017, 4:04 PM Reply Quote 0
                  • D
                    dcorpening @Wayne Workman
                    last edited by Jan 6, 2017, 4:04 PM

                    @Wayne-Workman Finally back from holiday break. Happy 2017 to everyone! Wayne, with one exception; everything, including transferring the images from the old to the new server, worked. The one issue is still importing the fogdb.sql. The last step of manually importing the fogdb.sql returns the error “ERROR 1046 (3D000) at line 22: No database selected”.

                    Getting me past this error should finish this project. Any help here would be greatly appreciated.

                    W 1 Reply Last reply Jan 7, 2017, 1:34 AM Reply Quote 0
                    • W
                      Wayne Workman @dcorpening
                      last edited by Wayne Workman Jan 6, 2017, 7:34 PM Jan 7, 2017, 1:34 AM

                      @dcorpening
                      This is just a guess but, on the new server, instead of using mysql < fogdb.sql try to use this:
                      mysql -D fog < fogdb.sql

                      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/

                      D 1 Reply Last reply Jan 9, 2017, 6:21 PM Reply Quote 0
                      • D
                        dcorpening @Wayne Workman
                        last edited by dcorpening Jan 9, 2017, 12:58 PM Jan 9, 2017, 6:21 PM

                        @Wayne-Workman mysql -D fog < fogdb.sql ‘seemed’ to work. The cursor was returned after about 10 seconds with no errors. When I go to the FOG WebUI to log in, I now get “Database Schema Installer/Updater”. See the uploaded pic. I rebooted the server, restarted the mysql service, etc. but still get “Database Schema Installer/Updater”. I click the <Install/Upgrade now> and it updates successfully and now correctly displays the WebUI login page. Problem is I cannot log in with any fog or root user password that I can think of; including the password that works on the server that the fogdb.sql came from. The /home/fog/fogsettings file show null for snmysqluser and snmysqlpass. There is no config.php located at /var/www/html/fog/commons/ …or in… /var/www/fog/commons/ 0_1483979369538_brokenfog.png

                        W 1 Reply Last reply Jan 10, 2017, 12:36 AM Reply Quote 0
                        • W
                          Wayne Workman @dcorpening
                          last edited by Jan 10, 2017, 12:36 AM

                          @dcorpening You can reset the fog web user’s password with steps here:
                          https://wiki.fogproject.org/wiki/index.php?title=Password_Central#Web_Interface

                          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/

                          D 1 Reply Last reply Jan 10, 2017, 5:47 PM Reply Quote 0
                          • D
                            dcorpening @Wayne Workman
                            last edited by Jan 10, 2017, 5:47 PM

                            @Wayne-Workman The first option of UPDATE users… returns “Query OK, 0 rows affected (0.00 sec)”. I still cannot log in so I assume the fog user does not exist; so I try to create it with the second option command of INSERT INTO users… This returns “Query OK, 1 row affected, 1 warning (0.00 sec)”. I still cannot log in, so I assume that the fog user was not properly created. I have triple checked all syntax and am not getting any syntax errors. How can I view the 1 warning returned by the INSERT command? Should I create the fog user at the old server CLI and transfer the fogdb.sql again?

                            W 1 Reply Last reply Jan 10, 2017, 5:55 PM Reply Quote 0
                            • W
                              Wayne Workman @dcorpening
                              last edited by Wayne Workman Jan 10, 2017, 11:56 AM Jan 10, 2017, 5:55 PM

                              @dcorpening the web interface doesn’t use local accounts, it’s entirely based on what’s in the DB. Select the entire table and take a look through it. These two queries should help:

                              SELECT * FROM users;
                              DESCRIBE users;
                              

                              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/

                              D 1 Reply Last reply Jan 10, 2017, 6:26 PM Reply Quote 0
                              • D
                                dcorpening @Wayne Workman
                                last edited by Jan 10, 2017, 6:26 PM

                                @Wayne-Workman 0_1484072718468_Screenshot from 2017-01-10 13_23_26.png What do you glean from this pic?

                                W 1 Reply Last reply Jan 10, 2017, 8:59 PM Reply Quote 0
                                • W
                                  Wayne Workman @dcorpening
                                  last edited by Jan 10, 2017, 8:59 PM

                                  @dcorpening That there are two fog accounts. I’d truncate the table and then insert a single fresh one using the previously mentioned command in the wiki. The password for it as the wiki states is password. And this is for the web interface - just to clairify.

                                  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/

                                  D 1 Reply Last reply Jan 10, 2017, 10:50 PM Reply Quote 0
                                  • D
                                    dcorpening @Wayne Workman
                                    last edited by Jan 10, 2017, 10:50 PM

                                    @Wayne-Workman 0_1484088280551_Screenshot from 2017-01-10 17_43_02.png Notice here that I truncate the table, verify with SELECT, and try to create the fog user with INSERT. Same results with 1 warning and not being able to log in. I hope this issue is not becoming a pain to you; however, it is certainly painful on my end after several reinstalls and many hours researching this. Any other suggestions would be greatly appreciated. Hopefully this fiasco will be a big help to others in the end once we find a fix.

                                    T 1 Reply Last reply Jan 10, 2017, 11:06 PM Reply Quote 0
                                    • T
                                      Tom Elliott @dcorpening
                                      last edited by Jan 10, 2017, 11:06 PM

                                      @dcorpening I see what’s happening.

                                      Please run in mysql:

                                      UPDATE `users` SET `uPass`=MD5('password') where `uName`='fog';
                                      

                                      The blowfish store was only added in 1.3.x series. As you’re running on 1.2.0 to 1.2.0, the password field is stored in md5.

                                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                      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

                                      D 1 Reply Last reply Jan 11, 2017, 6:43 PM Reply Quote 2
                                      • T
                                        Tom Elliott
                                        last edited by Jan 10, 2017, 11:11 PM

                                        And for reference:

                                        https://wiki.fogproject.org/wiki/index.php?title=Password_Central#1.2.0_and_lower

                                        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                        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 1
                                        • D
                                          dcorpening @Tom Elliott
                                          last edited by Jan 11, 2017, 6:43 PM

                                          @Tom-Elliott It worked! I can now log in. Thank you SO MUCH! I notice that no hosts, tftp/storage passwords, etc. are listed; Even though I’ve manually imported the fogdb.sql from the old server using “…mysql < fogdb.sql” : (Which is why I could log into the WebUI). Whether the import is done manually or via the WebUI, it seems that nothing is getting imported. The images are transferring now. So I think getting the fogdb.sql properly imported should be the last hurdle in setting up this new server. Please advise.

                                          T 1 Reply Last reply Jan 11, 2017, 6:44 PM Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post

                                          152

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project