Mass export host information
-
It’s entirely possible that this has been answered before, but I couldn’t find it. I am building a new FOG server, and I’d like to migrate the host information over from the old one. I know there’s a way to import them from a .csv file, but is there a way to export the list of hosts? They are both version 0.32.
-
Yes. Do you want just the hosts, or do you want to carry over the Hardware Inventory, Image Definitions, and other information too?
-
I suppose all the information would be helpful. The images are gone, so I’m going to have to rebuild them all, but that’s fine.
-
I’ve exported the hosts table from mysql, but the string for each host has a lot of information that isn’t accepted by the csv import.
-
To export:
[CODE]#mysqldump -u root -p[password] fog hosts > hosts.sql[/CODE]
To import
[CODE]#mysql -u root -p[password] fog < hosts.sql[/CODE]Or you can export the entire database, just leave off the table names in the mysqldump line. And import the entire database to the new server. Then all you have to do is update the settings in the webUI depending on if you changed IPs or passwords.
-
Good deal.
-
Is there a way to consolidate hosts onto one server? I would like to retain all of the Hardware Inventory, Image Definitions, and other information from a test system and import those systems into an existing Fog server. I don’t want to lose the hosts that are currently in the system though. Won’t your #mysql -u root -p[password] fog < hosts.sql command drop all of the current tables? Or, will it just add to the list?
-
Jhowzr, please start your own thread since your issue/request is different, just to keep things clean. Please include all relevant information. You may reference this thread in your own thread.
-
For future readers: https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG