RedmineMigrate » History » Version 9

Jean-Philippe Lang, 2009-01-10 10:44
add links to other systems importers

1 1 Jean-Philippe Lang
h1. Migrating from other systems
2 1 Jean-Philippe Lang
3 1 Jean-Philippe Lang
{{>TOC}}
4 1 Jean-Philippe Lang
5 1 Jean-Philippe Lang
h2. Trac
6 1 Jean-Philippe Lang
7 1 Jean-Philippe Lang
The Trac importer migrates:
8 1 Jean-Philippe Lang
9 1 Jean-Philippe Lang
    * Users
10 1 Jean-Philippe Lang
    * Components
11 1 Jean-Philippe Lang
    * Milestones
12 1 Jean-Philippe Lang
    * Tickets
13 1 Jean-Philippe Lang
    * 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 1 Jean-Philippe Lang
    * Wiki pages with history
17 1 Jean-Philippe Lang
18 1 Jean-Philippe Lang
Notes:
19 1 Jean-Philippe Lang
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 1 Jean-Philippe Lang
You need the sqlite-ruby gem (gem install sqlite-ruby) to access the Trac database.
25 1 Jean-Philippe Lang
26 1 Jean-Philippe Lang
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 Jean-Philippe Lang
1. Run the following command, where test is your Redmine target environment:
31 1 Jean-Philippe Lang
32 1 Jean-Philippe Lang
  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 1 Jean-Philippe Lang
36 1 Jean-Philippe Lang
<pre>
37 1 Jean-Philippe Lang
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 1 Jean-Philippe Lang
Target project identifier []: myproject
41 1 Jean-Philippe Lang
</pre>
42 1 Jean-Philippe Lang
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 7 Jean-Philippe Lang
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 1 Jean-Philippe Lang
47 1 Jean-Philippe Lang
4. The script migrates your data:
48 1 Jean-Philippe Lang
49 1 Jean-Philippe Lang
<pre>
50 1 Jean-Philippe Lang
Deleting data
51 1 Jean-Philippe Lang
Migrating components..............................
52 1 Jean-Philippe Lang
Migrating milestones..............
53 1 Jean-Philippe Lang
Migrating custom fields.......
54 1 Jean-Philippe Lang
Migrating tickets.................................
55 1 Jean-Philippe Lang
Migrating wiki...........
56 1 Jean-Philippe Lang
57 1 Jean-Philippe Lang
Components: 29/30
58 1 Jean-Philippe Lang
Milestones: 14/14
59 1 Jean-Philippe Lang
Tickets: 1275/1275
60 1 Jean-Philippe Lang
Ticket files: 106/106
61 1 Jean-Philippe Lang
Custom values: 4409/4409
62 1 Jean-Philippe Lang
Wiki edits: 102/102
63 1 Jean-Philippe Lang
</pre>
64 1 Jean-Philippe Lang
65 1 Jean-Philippe Lang
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 1 Jean-Philippe Lang
h2. Mantis
69 1 Jean-Philippe Lang
70 1 Jean-Philippe Lang
The Mantis importer migrates:
71 1 Jean-Philippe Lang
72 1 Jean-Philippe Lang
    * Users
73 1 Jean-Philippe Lang
    * Projects
74 1 Jean-Philippe Lang
    * Project versions, categories and news
75 1 Jean-Philippe Lang
    * Project memberships
76 1 Jean-Philippe Lang
    * Bugs
77 1 Jean-Philippe Lang
    * Bug notes, files, relations and monitors
78 1 Jean-Philippe Lang
    * Custom fields
79 1 Jean-Philippe Lang
80 1 Jean-Philippe Lang
User passwords are all set to "mantis".
81 1 Jean-Philippe Lang
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 1 Jean-Philippe Lang
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 5 Jean-Philippe Lang
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
87 1 Jean-Philippe Lang
88 1 Jean-Philippe Lang
1. Run the following command, where test is your Redmine target environment:
89 1 Jean-Philippe Lang
90 2 Jean-Philippe Lang
  rake redmine:migrate_from_mantis RAILS_ENV="test"
91 1 Jean-Philippe Lang
92 1 Jean-Philippe Lang
2. The script asks you for your Mantis database settings:
93 1 Jean-Philippe Lang
94 1 Jean-Philippe Lang
<pre>
95 1 Jean-Philippe Lang
Please enter settings for your Mantis database
96 1 Jean-Philippe Lang
adapter [mysql]:
97 1 Jean-Philippe Lang
host [localhost]:
98 1 Jean-Philippe Lang
database [bugtracker]: mantis
99 1 Jean-Philippe Lang
username [root]:
100 1 Jean-Philippe Lang
password []:
101 1 Jean-Philippe Lang
encoding [UTF-8]:
102 1 Jean-Philippe Lang
</pre>
103 1 Jean-Philippe Lang
104 1 Jean-Philippe Lang
Give the adapter, host name, database name, login, password and encoding of your Mantis database, or leave the default values.
105 1 Jean-Philippe Lang
106 1 Jean-Philippe Lang
The adapter can be mysql (default) or postgresql.
107 1 Jean-Philippe Lang
108 1 Jean-Philippe Lang
3. The script migrates your data:
109 1 Jean-Philippe Lang
110 1 Jean-Philippe Lang
<pre>
111 1 Jean-Philippe Lang
Migrating users...............
112 1 Jean-Philippe Lang
Migrating projects.............
113 1 Jean-Philippe Lang
Migrating bugs........................................
114 1 Jean-Philippe Lang
Migrating news...
115 1 Jean-Philippe Lang
Migrating custom fields..
116 1 Jean-Philippe Lang
117 1 Jean-Philippe Lang
Users: 15/15
118 1 Jean-Philippe Lang
Projects: 13/13
119 1 Jean-Philippe Lang
Memberships: 10/10
120 1 Jean-Philippe Lang
Versions: 33/33
121 1 Jean-Philippe Lang
Categories: 4/4
122 1 Jean-Philippe Lang
Bugs: 180/180
123 1 Jean-Philippe Lang
Bug notes: 336/336
124 1 Jean-Philippe Lang
Bug files: 46/46
125 1 Jean-Philippe Lang
Bug relations: 11/11
126 1 Jean-Philippe Lang
Bug monitors: 8/8
127 1 Jean-Philippe Lang
News: 3/3
128 1 Jean-Philippe Lang
Custom fields: 2/2
129 1 Jean-Philippe Lang
</pre>
130 1 Jean-Philippe Lang
131 1 Jean-Philippe Lang
The script gives you the total number of migrated objects.
132 9 Jean-Philippe Lang
133 9 Jean-Philippe Lang
h2. Other systems
134 9 Jean-Philippe Lang
135 9 Jean-Philippe Lang
You can find other importers submitted by Redmine users:
136 9 Jean-Philippe Lang
* Jira importer: #1385
137 9 Jean-Philippe Lang
* Buzilla importer: #989
138 9 Jean-Philippe Lang
139 9 Jean-Philippe Lang
These scripts are neither tested nor supported.
140 9 Jean-Philippe Lang
If you want to help, you can send "me":http://www.redmine.org/account/show/1 a database dump of these tools.