Transfer host hardware information from .32 to 1.4.3+



  • Server
    • FOG Version: 1.4.3
    • OS: Ubuntu 16.04.2 LTS
    Client
    • Service Version: NA
    • OS:
    Description

    Is there a way to transfer the HOST Hardware information from an older version of FOG to a newer version? I have transferred the HOST list, but it did not include the hardware info which also contains our TAG, User and miscellaneous comments.



  • @sebastian-roth said in Transfer host hardware information from .32 to 1.4.3+:

    @dsloan-ethra Though I am fairly sure the table structures of both hosts and inventory are slightly different from 0.32 to 1.4.4. So after thinking about this a little more I see that my suggestion on export/import just fog.inventory might have led you the wrong way at first, sorry for that. Most probably there always is an issue using mysqldump if you don’t do the entire database and let the schema updater work on it afterwards! So this is your only chance with the inventory table as there hasn’t been an export for this in 0.32. So even if we’d add an import function now you wouldn’t be able to use it as you cannot export from 0.32.

    I understand that the feature won’t be in .32, but having the ability to export and import the Inventory information with the hosts might be useful for future releases even so. I also would like to suggest that the “Host Hardware Inventory” page always be editable, or at least allow the 3 editable fields to show up even if hardware information is unavailable (Primary User, Other Tag #1, and Other Tag #2). When there is no hardware data, the page is nearly blank with the words simply saying “No results found.” The last resort for me was to manually re-type (or script) the data to be pulled from the old DB and entered into the fields, but the fields wouldn’t be available on the screen because there was no hardware information. However, in my humble opinion, that shouldn’t stop me from being able to enter data into those 3 fields manually.

    Thank you again for the help! I do appreciate it.


  • Developer

    @dsloan-ethra Glad to hear that you got your information imported. I have to admit that I don’t really know the 0.32 DB structure as this was way before I joined into FOG. So I also had to guess a little about which way it might work (not going to setup a 0.32 server just to try it out myself).

    Though I am fairly sure the table structures of both hosts and inventory are slightly different from 0.32 to 1.4.4. So after thinking about this a little more I see that my suggestion on export/import just fog.inventory might have led you the wrong way at first, sorry for that. Most probably there always is an issue using mysqldump if you don’t do the entire database and let the schema updater work on it afterwards! So this is your only chance with the inventory table as there hasn’t been an export for this in 0.32. So even if we’d add an import function now you wouldn’t be able to use it as you cannot export from 0.32.



  • Alright, I guess found what I was doing wrong:

    Before importing, I was deleting all current hosts thinking that was necessary. This time, I left them alone and imported the hosts first (mysql -D fog -u root < ./newhosts.sql), then the inventory (mysql -D fog -u root < ./newinventory.sql). Waited 5 minutes, (Watching Futurama and got distracted), restarted the mysql service for good measure and logged in. Spot checked several hosts and they all had the missing inventory and hardware information, including my inventory tag information.

    Thank you for the table name (inventory)! That was information I’ve been looking for quite a while!



  • @sebastian-roth said in Transfer host hardware information from .32 to 1.4.3+:

    @dsloan-ethra Are you still interested in doing this? Shouldn’t be too much a trouble if the hostIDs in the DB have not changed. You’d just need to export fog.inventory table from the old DB and import that to the new DB. Let us know if you need help with that.

    I am and I attempted to export the hosts and inventory tables from the .32 server and imported them into the 1.4.4 server and the hosts would not show up. I then exported the whole .32 database and imported it into the 1.4.4 and it did a schema update. I cleaned up the hosts, removing the old images, snap-ins, etc and exported the hosts and inventory again (using mysqldump), moving the current 1.4.4 database back… But when I imported the “updated” hosts and inventory, I still can’t list the hosts in the “Host Management”…

    I have always had bad luck with SQL management, so I am likely doing something wrong so if you have some instructions that might show me what I am doing wrong, I’d appreciate it.

    Perhaps adding the inventory as part of the Hosts export would be a nice future feature addition.


  • Developer

    @dsloan-ethra Are you still interested in doing this? Shouldn’t be too much a trouble if the hostIDs in the DB have not changed. You’d just need to export fog.inventory table from the old DB and import that to the new DB. Let us know if you need help with that.



  • This post is deleted!

  • Moderator

    @dsloan-ethra said in Transfer host hardware information from .32 to 1.4.3+:

    Is there a way to transfer the HOST Hardware information from an older version of FOG to a newer version? I have transferred the HOST list, but it did not include the hardware info which also contains our TAG, User and miscellaneous comments.

    You could export the entire DB, and import into the new server. The new FOG versions will update the DB schema and it’ll work. However, when you import another FOG Server’s DB, you will need to adjust specific fields afterwards like IP addresses, passwords, etc. Those particulars are all outlined here: https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG#Fix_IP_Addresses.2C_Passwords.2C_and_Interface_on_new_server


Log in to reply
 

435
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

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