Migration Help

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
voldor
Posts: 1
Joined: 10 Sep 2007, 10:04

Migration Help

Post by voldor »

Hello i'm using the mantis distrib 1.0.8 with apache and PHP coming with the distrib.

What i would like to do is to change my apache, Mysql and PHP level without any data loss from Mantis. How can i do that ?

Is a database backup enough ?
How can i perform it ?

Sorry i'm a real newbie here
mroeder
Posts: 39
Joined: 10 Apr 2006, 20:56

Post by mroeder »

Don't also change the version of Mantis at the same time. In the MySQL executables directory you will find a command called mysqldump:

Code: Select all

mysqldump --add-drop-table -B -v -u root -p bugtracker > bugtracker-20070913.sql
That creates a text file of MySQL commands that will perfectly duplicate the whole database. Run that command and save the file somewhere. You might also want to make a tarball of the Mantis directory just in case.
Now you can upgrade the server software. Updating Apache and PHP should not have destroyed the Mantis folder, but updating MySQL would probably have destroyed or made inaccessible the MySQL tables. So now you create the bugtracker database and run

Code: Select all

mysql  bugtracker < bugtracker-20070913.sql
to put all the data back in.

(The 20070913 bit is just a date code to help you remember when the backup happened. You can run that snippet of code as a cron task and back up the bugbase regularly.)
Post Reply