Database migration and database in external host



  • 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!


  • Moderator

    @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.


  • Senior Developer

    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.)



  • 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!


  • Moderator

    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


  • Moderator

    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?


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.