RedmineMigrate » History » Version 34

Hideyuki KATO, 2020-07-30 15:12

1 17 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 34 Hideyuki KATO
*Obsolete: Does not work*
8 34 Hideyuki KATO
9 1 Jean-Philippe Lang
The Trac importer migrates:
10 17 Jean-Philippe Lang
11 1 Jean-Philippe Lang
    * Users
12 1 Jean-Philippe Lang
    * Components
13 1 Jean-Philippe Lang
    * Milestones
14 1 Jean-Philippe Lang
    * Tickets
15 1 Jean-Philippe Lang
    * Ticket comments and changes (status and resolution)
16 7 Jean-Philippe Lang
    * Trac specific fields (eg. Resolution) are added as custom fields in Redmine
17 1 Jean-Philippe Lang
    * Ticket files and custom fields
18 1 Jean-Philippe Lang
    * Wiki pages with history
19 1 Jean-Philippe Lang
20 1 Jean-Philippe Lang
Notes:
21 1 Jean-Philippe Lang
22 8 Jean-Philippe Lang
# User passwords are all set to @trac@
23 7 Jean-Philippe Lang
# Ticket ids are preserved if there's no ticket in your Redmine database yet
24 8 Jean-Philippe Lang
# Custom fields are all created as text custom fields in Redmine
25 1 Jean-Philippe Lang
26 11 Barbara Post
You need the sqlite-ruby gem to access the Trac database.
27 11 Barbara Post
28 11 Barbara Post
- For sqlite: <pre>gem install sqlite-ruby</pre>
29 11 Barbara Post
- For sqlite3: <pre>gem install sqlite3-ruby</pre>
30 1 Jean-Philippe Lang
31 1 Jean-Philippe Lang
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
32 3 Jean-Philippe Lang
33 12 Barbara Post
The script was tested with a 0.10 Trac sqlite database and a 0.11 Trac sqlite3 database.
34 1 Jean-Philippe Lang
35 1 Jean-Philippe Lang
1. Run the following command, where test is your Redmine target environment:
36 1 Jean-Philippe Lang
37 1 Jean-Philippe Lang
  rake redmine:migrate_from_trac RAILS_ENV="test"
38 2 Jean-Philippe Lang
39 22 James Rowe
2. The script (source:trunk/lib/tasks/migrate_from_trac.rake) asks you for your Trac settings:
40 1 Jean-Philippe Lang
41 1 Jean-Philippe Lang
<pre>
42 1 Jean-Philippe Lang
Trac directory []: /var/trac/myproject
43 7 Jean-Philippe Lang
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]:
44 1 Jean-Philippe Lang
Database encoding [UTF-8]:
45 1 Jean-Philippe Lang
Target project identifier []: myproject
46 1 Jean-Philippe Lang
</pre>
47 1 Jean-Philippe Lang
48 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.
49 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).
50 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).
51 1 Jean-Philippe Lang
52 31 Robert Schneider
3. The script migrates your data:
53 1 Jean-Philippe Lang
54 1 Jean-Philippe Lang
<pre>
55 1 Jean-Philippe Lang
Deleting data
56 1 Jean-Philippe Lang
Migrating components..............................
57 1 Jean-Philippe Lang
Migrating milestones..............
58 1 Jean-Philippe Lang
Migrating custom fields.......
59 1 Jean-Philippe Lang
Migrating tickets.................................
60 1 Jean-Philippe Lang
Migrating wiki...........
61 1 Jean-Philippe Lang
62 1 Jean-Philippe Lang
Components: 29/30
63 1 Jean-Philippe Lang
Milestones: 14/14
64 1 Jean-Philippe Lang
Tickets: 1275/1275
65 1 Jean-Philippe Lang
Ticket files: 106/106
66 1 Jean-Philippe Lang
Custom values: 4409/4409
67 1 Jean-Philippe Lang
Wiki edits: 102/102
68 1 Jean-Philippe Lang
</pre>
69 1 Jean-Philippe Lang
70 1 Jean-Philippe Lang
The script gives you the total number of migrated objects.
71 7 Jean-Philippe Lang
Now, you should see a project called Myproject in Redmine with your Trac data loaded in this project.
72 1 Jean-Philippe Lang
73 1 Jean-Philippe Lang
h2. Mantis
74 34 Hideyuki KATO
75 34 Hideyuki KATO
*Obsolete: Does not work*
76 1 Jean-Philippe Lang
77 1 Jean-Philippe Lang
The Mantis importer migrates:
78 1 Jean-Philippe Lang
79 1 Jean-Philippe Lang
    * Users
80 1 Jean-Philippe Lang
    * Projects
81 1 Jean-Philippe Lang
    * Project versions, categories and news
82 1 Jean-Philippe Lang
    * Project memberships
83 1 Jean-Philippe Lang
    * Bugs
84 1 Jean-Philippe Lang
    * Bug notes, files, relations and monitors
85 1 Jean-Philippe Lang
    * Custom fields
86 1 Jean-Philippe Lang
87 1 Jean-Philippe Lang
User passwords are all set to "mantis".
88 1 Jean-Philippe Lang
89 8 Jean-Philippe Lang
Bug files migration only works if they're stored in your Mantis database (this is the default Mantis behaviour).
90 1 Jean-Philippe Lang
91 1 Jean-Philippe Lang
The script was tested with different 1.0.x Mantis databases and should work with any other recent versions.
92 5 Jean-Philippe Lang
93 5 Jean-Philippe Lang
Before starting, you need a fresh Redmine database, *with default data loaded (required)*. See [[RedmineInstall|Redmine installation]].
94 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/
95 1 Jean-Philippe Lang
96 30 Toshi MARUYAMA
Make sure to apply the patch #10504.
97 20 Terence Mill
98 1 Jean-Philippe Lang
1. Run the following command, where test is your Redmine target environment:
99 1 Jean-Philippe Lang
100 2 Jean-Philippe Lang
  rake redmine:migrate_from_mantis RAILS_ENV="test"
101 1 Jean-Philippe Lang
102 1 Jean-Philippe Lang
2. The script asks you for your Mantis database settings:
103 1 Jean-Philippe Lang
104 1 Jean-Philippe Lang
<pre>
105 1 Jean-Philippe Lang
Please enter settings for your Mantis database
106 1 Jean-Philippe Lang
adapter [mysql]:
107 1 Jean-Philippe Lang
host [localhost]:
108 1 Jean-Philippe Lang
database [bugtracker]: mantis
109 1 Jean-Philippe Lang
username [root]:
110 1 Jean-Philippe Lang
password []:
111 1 Jean-Philippe Lang
encoding [UTF-8]:
112 1 Jean-Philippe Lang
</pre>
113 1 Jean-Philippe Lang
114 1 Jean-Philippe Lang
Give the adapter, host name, database name, login, password and encoding of your Mantis database, or leave the default values.
115 1 Jean-Philippe Lang
116 1 Jean-Philippe Lang
The adapter can be mysql (default) or postgresql.
117 1 Jean-Philippe Lang
118 1 Jean-Philippe Lang
3. The script migrates your data:
119 1 Jean-Philippe Lang
120 1 Jean-Philippe Lang
<pre>
121 1 Jean-Philippe Lang
Migrating users...............
122 1 Jean-Philippe Lang
Migrating projects.............
123 1 Jean-Philippe Lang
Migrating bugs........................................
124 1 Jean-Philippe Lang
Migrating news...
125 1 Jean-Philippe Lang
Migrating custom fields..
126 1 Jean-Philippe Lang
127 1 Jean-Philippe Lang
Users: 15/15
128 1 Jean-Philippe Lang
Projects: 13/13
129 1 Jean-Philippe Lang
Memberships: 10/10
130 1 Jean-Philippe Lang
Versions: 33/33
131 1 Jean-Philippe Lang
Categories: 4/4
132 1 Jean-Philippe Lang
Bugs: 180/180
133 1 Jean-Philippe Lang
Bug notes: 336/336
134 1 Jean-Philippe Lang
Bug files: 46/46
135 1 Jean-Philippe Lang
Bug relations: 11/11
136 1 Jean-Philippe Lang
Bug monitors: 8/8
137 1 Jean-Philippe Lang
News: 3/3
138 1 Jean-Philippe Lang
Custom fields: 2/2
139 1 Jean-Philippe Lang
</pre>
140 1 Jean-Philippe Lang
141 1 Jean-Philippe Lang
The script gives you the total number of migrated objects.
142 32 Robert Schneider
143 18 Jean-Philippe Lang
h2. Other systems and third-party scripts
144 9 Jean-Philippe Lang
145 18 Jean-Philippe Lang
You can find other importers created by Redmine users:
146 18 Jean-Philippe Lang
147 20 Terence Mill
* "Non-destructive migration from Mantis to Redmine":http://blog.foaa.de/2010/04/non-destructive-migration-from-mantis-to-redmine/
148 33 Timon Eckert
> * No support anymore
149 9 Jean-Philippe Lang
* Jira importer: #1385
150 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.
151 18 Jean-Philippe Lang
* Scarab importer: #2928
152 1 Jean-Philippe Lang
* Migrate projects from another instance of Redmine: https://github.com/PowerKiKi/redmine-tools
153 33 Timon Eckert
-* "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-
154 27 Jonathan Katon
* Migrate phpBugTracker-1.0.5 to Redmine 2.5: https://github.com/ottodude125/migrate_from_phpbt_to_redmine - Though not exact, this shares some similarities to the Mantis import script
155 14 Clauber Anjos
156 17 Jean-Philippe Lang
These scripts are neither tested nor supported.