Mantis to Trac conversion script


This script allows you to import a ticket repository from Mantis to Trac.

Currently, the following data is imported from Mantis:

  • bugs
  • bug comments
  • bug activity (field changes)
  • attachments (as long as they're stored in the database)

Attachments are imported only if they are stored in the database. There is no provision for migrating filesystem-based attachments. If you use the script, please read the NOTES section at the top of the file and make sure you adjust the configuration parameters for your environment.

See also: t:TracImport

Bugs/Feature Requests

If you have any issues, please create a new ticket on github.

Historical bugs and feature requests for MantisImportScript are here.


Download the zipped source from github.


You can browse the source and check out MantisImportScript from here using git or subversion.

Example has similar parameters as the script:

mantis2trac - Imports a bug database from Mantis into Trac.

Usage: [options]

Available Options:

  --db [MySQL dbname]                - Mantis database
  --tracenv /path/to/trac/env        - Full path to Trac db environment
  -h | --host [MySQL hostname]       - Mantis DNS host name
  -u | --user [MySQL username]       - Effective Mantis database user
  -p | --passwd [MySQL password]     - Mantis database user password
  -c | --clean                       - Remove current Trac tickets before importing
  --products [Product1,"Product 2"]  - List of products to import from mantis
  --help | help                      - This help info


Author: Paul Baranowski
Contributors: João Prado Maia, codeFiend, John Lichovník

Last modified 7 weeks ago Last modified on Sep 3, 2016, 10:31:19 AM