Forum archive
Importing MYSQL DB into Turnkey Appliance
Good Morning Everyone,
I am rather new to the Turnkey appliances. I am looking to use one of the Bugzilla appliances to replace our old Bugzilla setup. It uses an old Linux OS and MYSQL, but separately. I am looking to import one of the DB backups from the current system into the new appliance, but am not sure where to import it in the appliance. Any guidance is much appreciated.
Thanks,
Jason
You don't mention what OS (beyond Linux) that the old Bugzilla server is, so I'm going to assume that it's something non-TurnKey (and therefore assume that you aren't using TKLBAM, nor is it an option). You also don't mention how your create the Bugzilla backup? I'm going to assume that you just zipped up your old Bugzilla directory and used mysqldump to create a dump of your old bugzilla DB; i.e. on your old Bugzilla server, something like this (assuming DB is called "bugzilla"):
Once you copy the DB dump file across, you should be able to just import it. I recommend that you dump, drop and recreate the default "bugzilla" DB that TurnKey ships with TurnKey. Then import the old DB and ensure that the 'bugzilla' DB user has the appropriate permissions. So on the new TurnKey Bugzilla, like this:
I'm not sure how old your old Bugzilla is, but assuming that it's compatible with the current Bugzilla upgrade docs then I'll provide some notes/suggestions on how to finish up. Regardless, it may be worth having a browse through the Bugzilla upgrade notes for changes of note between versions (you won't need to apply any of the general server changes, but it's good to be aware of the Bugzilla specific ones). Before you start actually doing anything further on the new TurnKey server, I suggest that you create a copy of the default TurnKey Bugzilla dir. I.e.:
Then get the randomly generated 'bugzilla" DB password from the default TurnKey config file:
Then as per the docs, copy the contents of the lib/ & data/ directories, plus the localconfig file from your old Bugzilla, into the default TurnKey one. Be sure to edit the localconfig file (e.g. via "nano") so that it has the same 'db_pass' as the original one (also if the DB name, or the DB username are not 'bugzilla', also adjust them). Assuming that you have unpacked the old Bugzilla directory as /var/www/bugzilla-old:
Then you should be able to finalise the upgrade/migration by running the checksetup.pl script. Like this:
Hopefully that should "just work". Also, probably a good idea to run the sanity check.