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