<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=TracImport</id>
	<title>TracImport - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=TracImport"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=TracImport&amp;action=history"/>
	<updated>2026-06-06T09:50:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=TracImport&amp;diff=304&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == Importing ticket data ==  === Bugzilla ===  Ticket data can be imported from Bugzilla using the [http://trac.edgewall.org/browser/trunk/contrib/bugzilla2trac.py bugzilla2t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=TracImport&amp;diff=304&amp;oldid=prev"/>
		<updated>2015-08-26T12:29:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == Importing ticket data ==  === Bugzilla ===  Ticket data can be imported from Bugzilla using the [http://trac.edgewall.org/browser/trunk/contrib/bugzilla2trac.py bugzilla2t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Importing ticket data ==&lt;br /&gt;
&lt;br /&gt;
=== Bugzilla ===&lt;br /&gt;
&lt;br /&gt;
Ticket data can be imported from Bugzilla using the [http://trac.edgewall.org/browser/trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bugzilla2trac.py&lt;br /&gt;
bugzilla2trac - Imports a bug database from Bugzilla into Trac.&lt;br /&gt;
&lt;br /&gt;
Usage: bugzilla2trac.py [options]&lt;br /&gt;
&lt;br /&gt;
Available Options:&lt;br /&gt;
  --db &amp;lt;MySQL dbname&amp;gt;              - Bugzilla&amp;#039;s database&lt;br /&gt;
  --tracenv /path/to/trac/env      - full path to Trac db environment&lt;br /&gt;
  -h | --host &amp;lt;MySQL hostname&amp;gt;     - Bugzilla&amp;#039;s DNS host name&lt;br /&gt;
  -u | --user &amp;lt;MySQL username&amp;gt;     - effective Bugzilla&amp;#039;s database user&lt;br /&gt;
  -p | --passwd &amp;lt;MySQL password&amp;gt;   - Bugzilla&amp;#039;s user password&lt;br /&gt;
  -c | --clean                     - remove current Trac tickets before importing&lt;br /&gt;
  --help | help                    - this help info&lt;br /&gt;
&lt;br /&gt;
Additional configuration options can be defined directly in the script.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, the following data is imported from Bugzilla:&lt;br /&gt;
&lt;br /&gt;
**bugs&lt;br /&gt;
**bug activity (field changes)&lt;br /&gt;
**bug attachments&lt;br /&gt;
**user names and passwords (put into a htpasswd file)&lt;br /&gt;
&lt;br /&gt;
The script provides a number of features to ease the conversion, such as:&lt;br /&gt;
&lt;br /&gt;
**PRODUCT_KEYWORDS:  Trac doesn&amp;#039;t have the concept of products, so the script provides the ability to attach a ticket keyword instead.&lt;br /&gt;
&lt;br /&gt;
**IGNORE_COMMENTS:  Don&amp;#039;t import Bugzilla comments that match a certain regexp.&lt;br /&gt;
&lt;br /&gt;
**STATUS_KEYWORDS:  Attach ticket keywords for the Bugzilla statuses not available in Trac.  By default, the &amp;#039;VERIFIED&amp;#039; and &amp;#039;RELEASED&amp;#039; Bugzilla statuses are translated into Trac keywords.&lt;br /&gt;
&lt;br /&gt;
For more details on the available options, see the configuration section at the top of the script.&lt;br /&gt;
&lt;br /&gt;
=== Sourceforge ===&lt;br /&gt;
&lt;br /&gt;
Ticket data can be imported from Sourceforge using the [http://trac.edgewall.org/browser/trunk/contrib/sourceforge2trac.py sourceforge2trac.py] script, available in the contrib/ directory of the Trac distribution.&lt;br /&gt;
&lt;br /&gt;
See #Trac3521 for an updated sourceforge2trac script.&lt;br /&gt;
&lt;br /&gt;
=== Mantis ===&lt;br /&gt;
&lt;br /&gt;
The mantis2trac script now lives at http://trac-hacks.org/wiki/MantisImportScript. You can always get the latest version from http://trac-hacks.org/changeset/latest/mantisimportscript?old_path=/&amp;amp;filename=mantisimportscript&amp;amp;format=zip&lt;br /&gt;
&lt;br /&gt;
Mantis bugs can be imported using the attached script.&lt;br /&gt;
&lt;br /&gt;
Currently, the following data is imported from Mantis:&lt;br /&gt;
**bugs&lt;br /&gt;
**bug comments&lt;br /&gt;
**bug activity (field changes)&lt;br /&gt;
**attachments (as long as the files live in the mantis db, not on the filesystem) &lt;br /&gt;
&lt;br /&gt;
If you use the script, please read the NOTES section (at the top of the file) and make sure you adjust the config parameters for your environment.&lt;br /&gt;
&lt;br /&gt;
mantis2trac.py has the same parameters as the bugzilla2trac.py script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mantis2trac - Imports a bug database from Mantis into Trac.&lt;br /&gt;
&lt;br /&gt;
Usage: mantis2trac.py [options] &lt;br /&gt;
&lt;br /&gt;
Available Options:&lt;br /&gt;
  --db &amp;lt;MySQL dbname&amp;gt;              - Mantis database&lt;br /&gt;
  --tracenv /path/to/trac/env      - Full path to Trac db environment&lt;br /&gt;
  -h | --host &amp;lt;MySQL hostname&amp;gt;     - Mantis DNS host name&lt;br /&gt;
  -u | --user &amp;lt;MySQL username&amp;gt;     - Effective Mantis database user&lt;br /&gt;
  -p | --passwd &amp;lt;MySQL password&amp;gt;   - Mantis database user password&lt;br /&gt;
  -c | --clean                     - Remove current Trac tickets before importing&lt;br /&gt;
  --help | help                    - This help info&lt;br /&gt;
&lt;br /&gt;
Additional configuration options can be defined directly in the script.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Jira ===&lt;br /&gt;
&lt;br /&gt;
The [http://trac-hacks.org/wiki/JiraToTracIntegration Jira2Trac plugin] provides you with tools to import Atlassian Jira backup files into Trac.&lt;br /&gt;
&lt;br /&gt;
The plugin consists of a Python 3.1 commandline tool that:&lt;br /&gt;
&lt;br /&gt;
 - Parses the Jira backup XML file&lt;br /&gt;
 - Sends the imported Jira data and attachments to Trac using the [http://trac-hacks.org/wiki/XmlRpcPlugin XmlRpcPlugin]&lt;br /&gt;
 - Generates a htpasswd file containing the imported Jira users and their SHA-512 base64 encoded passwords&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
Since trac uses a SQL database to store the data, you can import from other systems by examining the database tables. Just go into [http://www.sqlite.org/sqlite.html sqlite] command line to look at the tables and import into them from your application.&lt;br /&gt;
&lt;br /&gt;
==== Using a comma delimited file - CSV ====&lt;br /&gt;
See http://trac.edgewall.org/attachment/wiki/TracSynchronize/csv2trac.2.py for details.  This approach is particularly useful if one needs to enter a large number of tickets by hand. (note that the ticket type type field, (task etc...) is also needed for this script to work with more recent Trac releases)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>