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