Project

General

Profile

RedmineMigrate » History » Version 14

Clauber Anjos, 2010-01-06 17:24

1 14 Clauber Anjos
*h1. Migrating from other systems
2 1 Jean-Philippe Lang
3
{{>TOC}}
4
5
h2. Trac
6
7
The Trac importer migrates:
8 14 Clauber Anjos
!!
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 1 Jean-Philippe Lang
2. The script asks you for your Trac settings:
38
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 1 Jean-Philippe Lang
91
1. Run the following command, where test is your Redmine target environment:
92
93 2 Jean-Philippe Lang
  rake redmine:migrate_from_mantis RAILS_ENV="test"
94 1 Jean-Philippe Lang
95
2. The script asks you for your Mantis database settings:
96
97
<pre>
98
Please enter settings for your Mantis database
99
adapter [mysql]:
100
host [localhost]:
101
database [bugtracker]: mantis
102
username [root]:
103
password []:
104
encoding [UTF-8]:
105
</pre>
106
107
Give the adapter, host name, database name, login, password and encoding of your Mantis database, or leave the default values.
108
109
The adapter can be mysql (default) or postgresql.
110
111
3. The script migrates your data:
112
113
<pre>
114
Migrating users...............
115
Migrating projects.............
116
Migrating bugs........................................
117
Migrating news...
118
Migrating custom fields..
119
120
Users: 15/15
121
Projects: 13/13
122
Memberships: 10/10
123
Versions: 33/33
124
Categories: 4/4
125
Bugs: 180/180
126
Bug notes: 336/336
127
Bug files: 46/46
128
Bug relations: 11/11
129
Bug monitors: 8/8
130
News: 3/3
131
Custom fields: 2/2
132
</pre>
133
134
The script gives you the total number of migrated objects.
135 9 Jean-Philippe Lang
136
h2. Other systems
137
138
You can find other importers submitted by Redmine users:
139
* Jira importer: #1385
140 13 Lucas Panjer
* Bugzilla importer: #989
141 1 Jean-Philippe Lang
* Scarab importer: #2928
142
143 14 Clauber Anjos
These scripts are neither tested nor supported**.<pre>
144
145
</pre>*