Page 1 of 1

Migrating Mantis to a new server

Posted: 20 May 2014, 21:21
by ssphoenixaz
I need to migrate Mantis to a new server (phasing out a legacy server). Any chance for a document describing how to migrate data across?

Thank you.

Re: Migrating Mantis to a new server

Posted: 20 May 2014, 22:52
by paul
This should be a rather simple process:

Mantis Consists of 3 components:

a) The php/webpage source code itself
b) The configuration files (config_inc.php)
c) The database

Probably the easiest way of migrating is to keep the same version of the code (if you need to upgrade Mantis to a new version, do that as a separate process)

I'd be inclined to do the following:

a) copy the mantis folder containing the php files
b) set up your webserver to give server the php files. (You'll probably be met with some error page due to not being able to find the database).
c) Edit config_inc.php to update relevant settings, at the very least you'll probably need to update Database ($g_db_*) configuration options to point to the new database. You may need to update SMTP authentication details/server depending on what sort of migration you are doing.
d) Final step would then be to migrate the database itself. The mysqldump command can be used if MySQL is being used. pgdump for Postgres, and if running MSSQL perform a backup/restore or copy the MDF files and re-attach. The correct process for backing up and restoring the database in your environment is something that hopefully you are aware of.

In the general case, I would not expect you to have settings that would be affected by a server move in the database (the mantis_config_table) contains any database configuration settings, so it should be a simple case of moving the php files, backup/restore the database onto the new server and fixing up the config_inc.php file with the new database settings.

If you store attachments on the file system, and have multiple projects, it may be worth checking the path that attachments are stored to is correct, and that you can still access attachments linked to bugs (for each projects) after the migration.