他システムからの移行
Trac
Trac importerで移行できる内容:
- ユーザー
- コンポーネント
- マイルストーン
- チケット
- チケットのコメント、変更(status and resolution)
- Trac固有のフィールド(例: Resolution)はカスタムフィールドとして移行される
- チケットのファイルとカスタムフィールド
- Wikiページと履歴
注意:
- ユーザーのパスワードはすべて
tracに設定されます。 - チケットのidは、Redmineデータベースにチケットが全く登録されていない場合に限り保持されます。
- カスタムフィールドはRedmine上ではすべてtext型で作成されます。
Tracのデータベースにアクセスするにはsqlite-ruby gemが必要です。
- sqlite: gem install sqlite-ruby
- sqlite3: gem install sqlite3-ruby
作業を開始する前に、デフォルトデータがロードされたRedmineデータベースが必要です。 Redmineのインストール を参照してください。
移行スクリプトはTrac 0.10および0.11のsqliteデータベースでの動作確認を行いました。
1. 下記コマンドを実行してください。なお、’test’は移行先のRedmine環境です(通常はproductionなど):
rake redmine:migrate_from_trac RAILS_ENV=“test”2. スクリプトがTracの設定について問い合わせを行います:
Trac directory []: /var/trac/myproject Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: Database encoding [UTF-8]: Target project identifier []: myproject
Trac directoryは、移行対象のTrac environmentのディレクトリです。Redmineはこのディレクトリ以下の db/trac.db (sqlite/sqlite3の場合) と attachments ディレクトリを参照します。
Tracのデータベースとしてmysqlまたはpostgresqlを使用している場合、DBへ接続するためのパラメータ入力が要求されます(ホスト, データベース名, ユーザー名, パスワード)。
Target project identifierは、移行先となrRedmineプロジェクトの識別子です(プロジェクトが存在しない場合は新規に作成されます)。
4. スクリプトによりデータ移行が行われます:
Deleting data Migrating components.............................. Migrating milestones.............. Migrating custom fields....... Migrating tickets................................. Migrating wiki........... Components: 29/30 Milestones: 14/14 Tickets: 1275/1275 Ticket files: 106/106 Custom values: 4409/4409 Wiki edits: 102/102
移行されたオブジェクトの合計数が表示されます。
これで、Redmine上にMyprojectという、Tracから移行されたプロジェクトが作成されているはずです。
Mantis
Mantis importerで移行できる内容:
- Users
- Projects
- Project versions, categories and news
- Project memberships
- Bugs
- Bug notes, files, relations and monitors
- Custom fields
ユーザーのパスワードはすべて"mantis"になります。
User passwords are all set to “mantis”.
Bug files migration only works if they’re stored in your Mantis database (this is the default Mantis behaviour).
The script was tested with different 1.0.x Mantis databases and should work with any other recent versions.
Before starting, you need a fresh Redmine database, with default data loaded (required). See Redmine installation.
When migrating into filled Redmine database, you can use Ulrichs Non-destructive migration Script
1. Run the following command, where test is your Redmine target environment:
rake redmine:migrate_from_mantis RAILS_ENV="test"
2. The script asks you for your Mantis database settings:
Please enter settings for your Mantis database adapter [mysql]: host [localhost]: database [bugtracker]: mantis username [root]: password []: encoding [UTF-8]:
Give the adapter, host name, database name, login, password and encoding of your Mantis database, or leave the default values.
The adapter can be mysql (default) or postgresql.
3. The script migrates your data:
Migrating users............... Migrating projects............. Migrating bugs........................................ Migrating news... Migrating custom fields.. Users: 15/15 Projects: 13/13 Memberships: 10/10 Versions: 33/33 Categories: 4/4 Bugs: 180/180 Bug notes: 336/336 Bug files: 46/46 Bug relations: 11/11 Bug monitors: 8/8 News: 3/3 Custom fields: 2/2
The script gives you the total number of migrated objects.
その他のシステムからの移行とサードパーティーのスクリプト
You can find other importers created by Redmine users:
- Non-destructive migration from Mantis to Redmine
- Jira importer: #1385
- Bugzilla importer: #989 There are currently two bugzilla importers. bz2redmine http://www.redmine.org/issues/2928 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.
- Scarab importer: #2928
- Mantis 1.2.0rc1: http://www.redmine.org/issues/2928
These scripts are neither tested nor supported.


