Consolidate hosts from multiple fog servers onto one. Possible?
-
Is there a way to consolidate hosts onto one server? We’ve got a fog server setup in a central location at our school. Prior to this, we had a few virtual fog servers setup and did some imaging with them. I would like to retain all of the Hardware Inventory, Image Definitions, and other information from those system and import those systems into the centrally located Fog server. I don’t want to lose the hosts that are currently in that system.
I know that I could run an inventory report and pull out the MAC address and hostname to import into the new server, but there doesn’t seem to be a way to import the other items (asset tag, etc.) from the GUI.
[url]http://fogproject.org/forum/threads/mass-export-host-information.902/#post-7946[/url] covers exporting the database/hosts to use on a new system, but if I ran the import on an existing system, wouldn’t the command
[B]#mysql -u root -p[password] fog < hosts.sql[/B] drop all of the current hosts? Or, will it just add to the list? -
Found this page about MYSQL backups which says that within the SQL command file is the
DROP TABLES
command. My SQL experience is very limited, but that makes it sound like it won’t APPEND, but OVERWRITE.[url]http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/[/url]
You may want to consider looking at this: [url]http://dev.mysql.com/doc/refman/5.5/en/load-xml.html[/url]
It sounds like this would be better suited for you. Export the lines from one table and import them into another. I can’t guarantee that this is the right way to go about things, but it sounds like a start.
-
You’re going to run into index value overlaps or orphaned data in other tables. You’ll need to modify the data before you import it. Basically you’ll update the hostid in the hosts table and all tables that reference that value. Then you can import the data into all the existing database.
I’d be willing to work with you on this, but I don’t think it’s going to be quick and easy.