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

    Database migration and database in external host

    Scheduled Pinned Locked Moved Unsolved
    Linux Problems
    ubuntu 16.04 mysql
    4
    6
    2.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.
    • P
      pavon87
      last edited by

      Server
      • FOG Version: 1.2.0
      • OS: Ubuntu 16.04
      Description

      Hi all,

      I’m installing Fog 1.2.0 in a new VM with Ubuntu 16.04, preparing an update of my old server, with Fog .32 and Ubuntu 12.04.

      After a few work, finaly i have it working in 16.04, to get it i did:
      - Delete referenes of php5 in install file fog_1.2.0/lib/ubuntu/config and install manually the php7 versions
      - Delete line “@set_magic_quotes_runtime(0);” of file /var/www/fog/commons/init.php to avoid it, because is deprecated function in php7
      - Dissable “Strict SQL Mode” adding a file “disable_strict_mode.cnf” in configuration folder with this content:
      [mysqld]
      sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

      After this tweaks I have Fog 1.2.0 apparently working, but I have two questions:

      First, I want to upgrade my old database, I try follow the instructions (Wiki -> Upgrade to 1.x.x) but when I import the sql dump of old DB, nothing happends. I miss something?

      The other problem also is related with database, with 0.32 version I had the DB in other host, a dedicated DB server (with diferents DB), but with 1.2.0 I can’t find the right way to do it. I tried to change it before install, indicating the host, user and pass (with snmysqluser, snmysqlpass, snmysqlhost) in .install.sh but fog still connecting to localhost. In 0.32 version exist a file …fog/commons/config.php with a directive MYSQL_HOST that I used for this purpose.

      Any idea?

      Thanks in advance!

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

        Well I hate to say this after all of the effort you put into this upgrade, but you really should have went with FOG 1.3.0RCx series. I know its not “stable” just yet. But 1.3.0RCx has built in support for Ubuntu 16.04 as well as native support for uefi firmware, gpt formatted disks, nvme disks drives (a.k.a M.2 drives), WIn10 native support, faster imaging speed, and many UI improvements.

        My recommendation for you for 1.2.0 and even more so for 1.3.0 is to setup a new FOG server with a fresh database. The developers have some scripts for exporting earlier databases and importing them into the later databases if you are mainly concerned about host registration. The rest of the database structure has changed very much that it would be a difficult task to export, scrub, and then import the data into the new database. A lot would be quicker to just copy and paste from the UI of both. How many hosts are in your environment?

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

          I’d strongly suggest you use FOG 1.3.0 RC instead of 1.2.0. You will find - especially now - that you will need 1.3.0 RC for win10 support, GPT disk layouts, nvme type drives, ssd support, UEFI support, and not to mention all the performance and feature improvements.

          1.3.0 RC will install on fresh-clean Ubuntu 16 without any issues or hiccups or tweaks at all. Steps are here:
          https://wiki.fogproject.org/wiki/index.php?title=Upgrade_to_trunk

          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
          • P
            pavon87
            last edited by

            Reading the forum I was expecting this answer, but I tried it equals! hahaha
            I will move to 1.3.0.

            I have less tan 15 clients, I can do it manually

            Thank you very much!

            george1421G 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott
              last edited by

              snmysqlhost is the correct way to change which host your going to be using, but you should NEVER need to edit the installfog.sh file to do this (and it – as you already found – most likely will not work.)

              The same principles that made fog great work as they had before, and just as simply.

              I run with an “alternate db host” rather than a local one to my fog server, which is part of why I’m responding back…

              As @george1421 and @Wayne-Workman have informed you, the RC series of 1.3.0 are out and they have been tested against many different distros for installation checks.

              When PHP 7 released last year, I had already fixed the issues of the “set_magic_quotes_runtime” and had found a method to install php 7 with Fedora and CentOS. Arch natively stay’s “bleeding” edge so little work was there. I did have to take a little extra work to get Ubuntu 16.04 to install naturally with the installer because of the mysql security advancements they (they being ubuntu) added and to ensure it knows to install php 7.

              We’ve done a lot of work, and I really think you would be much happier with 1.3.0 RC’s than you will be with 1.2. There’s many reasons to upgrades, and little to no reasons “not” to (if that makes sense.)

              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
              • george1421G
                george1421 Moderator @pavon87
                last edited by

                @pavon87 said in Database migration and database in external host:

                I have less tan 15 clients, I can do it manually

                My comments would be the same with only 15 hosts even if you are staying on 1.2.0. You can do a manual copy and paste much faster than messing with database exports and imports. If you had a 100 hosts then I “might” explore the database route first.

                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 0
                • 1 / 1
                • First post
                  Last post

                264

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project