Project

General

Profile

RedmineMigrate » History » Version 25

Mantis2Redmine Migrator, 2011-11-12 03:48

1 17 Jean-Philippe Lang
h1. Migrating from other systems
2 1 Jean-Philippe Lang
3
{{>TOC}}
4
5
h2. Trac
6
7
The Trac importer migrates:
8 17 Jean-Philippe Lang
9 1 Jean-Philippe Lang
    * Users
10
    * Components
11
    * Milestones
12
    * Tickets
13
    * Ticket comments and changes (status and resolution)
14 7 Jean-Philippe Lang
    * Trac specific fields (eg. Resolution) are added as custom fields in Redmine
15 1 Jean-Philippe Lang
    * Ticket files and custom fields
16
    * Wiki pages with history
17
18
Notes:
19
20 8 Jean-Philippe Lang
# User passwords are all set to @trac@
21 7 Jean-Philippe Lang
# Ticket ids are preserved if there's no ticket in your Redmine database yet
22 8 Jean-Philippe Lang
# Custom fields are all created as text custom fields in Redmine
23 1 Jean-Philippe Lang
24 11 Barbara Post
You need the sqlite-ruby gem to access the Trac database.
25
26
- For sqlite: <pre>gem install sqlite-ruby</pre>
27
- For sqlite3: <pre>gem install sqlite3-ruby</pre>
28 1 Jean-Philippe Lang
29
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
30 3 Jean-Philippe Lang
31 12 Barbara Post
The script was tested with a 0.10 Trac sqlite database and a 0.11 Trac sqlite3 database.
32 1 Jean-Philippe Lang
33
1. Run the following command, where test is your Redmine target environment:
34
35
  rake redmine:migrate_from_trac RAILS_ENV="test"
36 2 Jean-Philippe Lang
37 22 James Rowe
2. The script (source:trunk/lib/tasks/migrate_from_trac.rake) asks you for your Trac settings:
38 1 Jean-Philippe Lang
39
<pre>
40
Trac directory []: /var/trac/myproject
41 7 Jean-Philippe Lang
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]:
42 1 Jean-Philippe Lang
Database encoding [UTF-8]:
43
Target project identifier []: myproject
44
</pre>
45
46 7 Jean-Philippe Lang
Trac directory is the root directory of your Trac environment. Redmine will look in this directory for @db/trac.db@ (if you choose sqlite/sqlite3 database) and the @attachments@ directory.
47
When using a mysql or postgresql Trac database, the script will ask you for the connection parameters (host, database name, username and password).
48 1 Jean-Philippe Lang
Target project identifier is the identifier of the Redmine project in which the data will be loaded (the project is created if not found).
49
50
4. The script migrates your data:
51
52
<pre>
53
Deleting data
54
Migrating components..............................
55
Migrating milestones..............
56
Migrating custom fields.......
57
Migrating tickets.................................
58
Migrating wiki...........
59
60
Components: 29/30
61
Milestones: 14/14
62
Tickets: 1275/1275
63
Ticket files: 106/106
64
Custom values: 4409/4409
65
Wiki edits: 102/102
66
</pre>
67
68
The script gives you the total number of migrated objects.
69 7 Jean-Philippe Lang
Now, you should see a project called Myproject in Redmine with your Trac data loaded in this project.
70 1 Jean-Philippe Lang
71
h2. Mantis
72
73
The Mantis importer migrates:
74
75
    * Users
76
    * Projects
77
    * Project versions, categories and news
78
    * Project memberships
79
    * Bugs
80
    * Bug notes, files, relations and monitors
81
    * Custom fields
82
83
User passwords are all set to "mantis".
84
85 8 Jean-Philippe Lang
Bug files migration only works if they're stored in your Mantis database (this is the default Mantis behaviour).
86 1 Jean-Philippe Lang
87
The script was tested with different 1.0.x Mantis databases and should work with any other recent versions.
88 5 Jean-Philippe Lang
89
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
90 21 Terence Mill
When migrating into filled Redmine database, you can use "Ulrichs":email://uk@fortrabbit.de "Non-destructive migration Script":http://blog.foaa.de/2010/04/non-destructive-migration-from-mantis-to-redmine/
91 1 Jean-Philippe Lang
92 20 Terence Mill
93 1 Jean-Philippe Lang
1. Run the following command, where test is your Redmine target environment:
94
95 2 Jean-Philippe Lang
  rake redmine:migrate_from_mantis RAILS_ENV="test"
96 1 Jean-Philippe Lang
97
2. The script asks you for your Mantis database settings:
98
99
<pre>
100
Please enter settings for your Mantis database
101
adapter [mysql]:
102
host [localhost]:
103
database [bugtracker]: mantis
104
username [root]:
105
password []:
106
encoding [UTF-8]:
107
</pre>
108
109
Give the adapter, host name, database name, login, password and encoding of your Mantis database, or leave the default values.
110
111
The adapter can be mysql (default) or postgresql.
112
113
3. The script migrates your data:
114
115
<pre>
116
Migrating users...............
117
Migrating projects.............
118
Migrating bugs........................................
119
Migrating news...
120
Migrating custom fields..
121
122
Users: 15/15
123
Projects: 13/13
124
Memberships: 10/10
125
Versions: 33/33
126
Categories: 4/4
127
Bugs: 180/180
128
Bug notes: 336/336
129
Bug files: 46/46
130
Bug relations: 11/11
131
Bug monitors: 8/8
132
News: 3/3
133
Custom fields: 2/2
134
</pre>
135
136
The script gives you the total number of migrated objects.
137 19 Ralph Juhnke
 
138 18 Jean-Philippe Lang
h2. Other systems and third-party scripts
139 9 Jean-Philippe Lang
140 18 Jean-Philippe Lang
You can find other importers created by Redmine users:
141
142 20 Terence Mill
* "Non-destructive migration from Mantis to Redmine":http://blog.foaa.de/2010/04/non-destructive-migration-from-mantis-to-redmine/
143 9 Jean-Philippe Lang
* Jira importer: #1385
144 19 Ralph Juhnke
* Bugzilla importer: #989 There are currently two bugzilla importers. bz2redmine http://github.com/ralli/bz2redmine and migrate_from_bugzilla http://github.com/ralli/migrate_from_bugzilla. The bz2redmine preserves the original bugzilla bug numbers and the migrate_from_bugzilla rake task uses the ActiveRecord framework and may be used to migrate from and to postgresql databases.
145 13 Lucas Panjer
* Scarab importer: #2928
146 18 Jean-Philippe Lang
* Mantis 1.2.0rc1: http://www.webismymind.be/page/fr/17/migrate-mantis-120rc1-to-redmine.html
147 23 Adrien Crivelli
* Migrate projects from another instance of Redmine: https://github.com/PowerKiKi/redmine-tools
148 24 Terence Mill
* "A trick to import data from Mantis":http://dotnetmarche.org/blogs/externalblogs/archive/2009/05/29/redmine-a-trick-to-import-data-from-mantis.aspx
149 25 Mantis2Redmine Migrator
* Migrate Mantis to Redmine using a Redmine's plugin: http://mantis2redmine.com/
150 14 Clauber Anjos
151 17 Jean-Philippe Lang
These scripts are neither tested nor supported.