DB : convert FOG 1.2.0 to 1.3.0
It’s possible to have a tool to convert FOG 1.2.0 database to 1.3.0 (git 7142) ?
When I’m going to 1.3.0, I’m using a new server and 1.2.0 won’t export data with UI.
Thanks for the response.
It’s great that it’s done, but simply directly updating would work too. Backups are always recommended, but such complex steps are not necessary.
Thank you guys, here’s the procedure I finally used:
- export old FOG database (OLD_fog.sql)
- export new FOG database (NEW_fog.sql)
- delete all tables in new FOG database
- import old FOG database
- upgrade via FOG interface
- export hosts via UI
- delete all tables
- import backup of new FOG database
- import hosts via UI (no upgrade needed)
@aruhuno Please read through this as well: https://forums.fogproject.org/topic/6883/migrate-hosts-from-1-2-to-dev-trunk
Let us know if you see any issues with migrating the database because I am sure more people will run into this and we should provide a solid solution for this (plus wiki entry!)…
@aruhuno The GUI of 1.2.0 can export the data, it’s here:
FOG Configuration -> Configuration Save -> Export
If that isn’t working for some reason, you can manually export the db. Steps for that are in here:
Here are some steps I found that describe exporting a single table:
Exporting and Importing An Individual MySQL Table
Posted by Steve on April 21, 2009
In moving databases from development to production it is sometimes necessary to export individual tables so that they can be imported into another database.
Exporting the Table
To export the table run the following command from the command line:
“mysqldump -p – –user=username dbname tableName > tableName.sql”
This will export the tableName to the file tableName.sql.
[NOTE: there should be no space between the two dashes, but I have to write it that way so that it display properly].
Importing the Table
To import the table run the following command from the command line:
mysql -u username -p -D dbname < tableName.sql
The path to the tableName.sql needs to be prepended with the absolute path to that file. At this point the table will be imported into the DB and you are ready to go!
I ran into this issue when attempting to add new tables to my database. I am unable to run the “LOAD DATA INFILE” command, that I had previously used to populate tables, because Webfaction does not give the permission to run the command. Therefore the simplest solution was to export a table from the MySQL database on my personal machine and then import it to the database on the Webfaction server, using the export/import commands seen above.
Hope this helps someone out with exporting individual tables and as always if any clarification is needed or I missed something feel free to let me know.
I know, but my new instance is already installed… Only hosts interested me is why I did not update.
Another reason is the transition from Debian 7 to 8 .
As far as I know, the database gets updated automatically.
You may want to take a backup just in case though.