Project

General

Profile

RedmineMigrate » History » Version 8

Jean-Philippe Lang, 2008-04-17 00:23
glitches

1 1 Jean-Philippe Lang
h1. Migrating from other systems
2
3
{{>TOC}}
4
5
h2. Trac
6
7
The Trac importer migrates:
8
9
    * 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
You need the sqlite-ruby gem (gem install sqlite-ruby) to access the Trac database.
25
26
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
27 3 Jean-Philippe Lang
28 7 Jean-Philippe Lang
The script was tested with a 0.10 Trac sqlite database and should work with 0.11 databases.
29 1 Jean-Philippe Lang
30
1. Run the following command, where test is your Redmine target environment:
31
32
  rake redmine:migrate_from_trac RAILS_ENV="test"
33 2 Jean-Philippe Lang
34 1 Jean-Philippe Lang
2. The script asks you for your Trac settings:
35
36
<pre>
37
Trac directory []: /var/trac/myproject
38 7 Jean-Philippe Lang
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]:
39 1 Jean-Philippe Lang
Database encoding [UTF-8]:
40
Target project identifier []: myproject
41
</pre>
42
43 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.
44
When using a mysql or postgresql Trac database, the script will ask you for the connection parameters (host, database name, username and password).
45 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).
46
47
4. The script migrates your data:
48
49
<pre>
50
Deleting data
51
Migrating components..............................
52
Migrating milestones..............
53
Migrating custom fields.......
54
Migrating tickets.................................
55
Migrating wiki...........
56
57
Components: 29/30
58
Milestones: 14/14
59
Tickets: 1275/1275
60
Ticket files: 106/106
61
Custom values: 4409/4409
62
Wiki edits: 102/102
63
</pre>
64
65
The script gives you the total number of migrated objects.
66 7 Jean-Philippe Lang
Now, you should see a project called Myproject in Redmine with your Trac data loaded in this project.
67 1 Jean-Philippe Lang
68
h2. Mantis
69
70
The Mantis importer migrates:
71
72
    * Users
73
    * Projects
74
    * Project versions, categories and news
75
    * Project memberships
76
    * Bugs
77
    * Bug notes, files, relations and monitors
78
    * Custom fields
79
80
User passwords are all set to "mantis".
81
82 8 Jean-Philippe Lang
Bug files migration only works if they're stored in your Mantis database (this is the default Mantis behaviour).
83 1 Jean-Philippe Lang
84
The script was tested with different 1.0.x Mantis databases and should work with any other recent versions.
85 5 Jean-Philippe Lang
86
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
87 1 Jean-Philippe Lang
88
1. Run the following command, where test is your Redmine target environment:
89
90 2 Jean-Philippe Lang
  rake redmine:migrate_from_mantis RAILS_ENV="test"
91 1 Jean-Philippe Lang
92
2. The script asks you for your Mantis database settings:
93
94
<pre>
95
Please enter settings for your Mantis database
96
adapter [mysql]:
97
host [localhost]:
98
database [bugtracker]: mantis
99
username [root]:
100
password []:
101
encoding [UTF-8]:
102
</pre>
103
104
Give the adapter, host name, database name, login, password and encoding of your Mantis database, or leave the default values.
105
106
The adapter can be mysql (default) or postgresql.
107
108
3. The script migrates your data:
109
110
<pre>
111
Migrating users...............
112
Migrating projects.............
113
Migrating bugs........................................
114
Migrating news...
115
Migrating custom fields..
116
117
Users: 15/15
118
Projects: 13/13
119
Memberships: 10/10
120
Versions: 33/33
121
Categories: 4/4
122
Bugs: 180/180
123
Bug notes: 336/336
124
Bug files: 46/46
125
Bug relations: 11/11
126
Bug monitors: 8/8
127
News: 3/3
128
Custom fields: 2/2
129
</pre>
130
131
The script gives you the total number of migrated objects.