Dariusz on Software

Methods and Tools

About This Site

Software development stuff


Mantis to Trac migration
Sun, 04 Oct 2009 17:26:54 +0000

Mantis and Trac are both bug tracking systems. A bug tracking system is a software application that is designed to help quality assurance and programmers keep track of reported software bugs in their work. It may be regarded as a sort of issue tracking system (Wikipedia). In this article we will use Trac's alias for an issue: Ticket.


Recently I decided to replace Mantis installation used for one of my customers into Trac. Mantis worked pretty well until the date, but had missing features when compared to Trac:

  • Trac supports Wiki syntax both in standalone wiki pages and inside tasks and comments
  • Trac's reports and queries are superb! You can easily create custom views of Your tickets and even place it inside Your Wiki pages! Wow!
  • Has integration with many version control systems - I'm going to use git integration (existing GIT-based projects)

On the other hand Mantis has some benefits over Trac:

  • Comments could be edited after adding (sometimes I need to update my comment, to clarify it for instance)
  • Authorisation is configurable (you can restricts access even to single comment)
  • You can disable e-mail notifications about Your actions (Trac sends everything)


First of all you have to create Your Trac project:

$ trac-admin /path/to/myproject initenv

Trac supports importing Mantis database by using this script. There are few small defects in import script so execution is not straightforward (you have to change current directory to Trac project directory):

$ cd <trac-project-directory> $ python ../mantis2trac.py --clean --db <mysql-mantis-database> --tracenv ./ -u <mysql-user> -p<mysql-password>

And finally you have to deploy Trac somewhere. Trac supports the following deployment methods:

  • standalone server
  • mod_python (Apache)
  • cgi
  • fastcgi
  • mod_wsgi

I selected FastCgi (as it's two times faster than CGI and less web-server dependant than mod_python):

$ trac-admin /path/to/env deploy /path/to/www/trac

Happy Tracking!

Tags: linux.


Created by Chronicle v3.5