Project

General

Profile

Actions

RedmineMigrate » History » Revision 5

« Previous | Revision 5/34 (diff) | Next »
Jean-Philippe Lang, 2007-11-09 14:16


Migrating from other systems

Trac

The Trac importer migrates:

  • Users
  • Components
  • Milestones
  • Tickets
  • Ticket comments and changes (status and resolution)
  • Ticket files and custom fields
  • Wiki pages with history

Notes:

  1. User passwords are all set to ‘trac’
  2. Ticket ids are preserved
  3. Custom fields are all created as ‘text’ custom fields in Redmine

You need the sqlite-ruby gem (gem install sqlite-ruby) to access the Trac database.

Before starting, you need a fresh Redmine database, with default data loaded (required). See Redmine installation.

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.
If your Trac database is a sqlite3 database, you'll have to make a slight change to lib/tasks/migrate_from_trac.rake:

- TracMigrate.establish_connection({:adapter => 'sqlite',
+ TracMigrate.establish_connection({:adapter => 'sqlite3',

1. Run the following command, where test is your Redmine target environment:

rake redmine:migrate_from_trac RAILS_ENV="test"

2. The script asks you for your Trac settings:

Trac directory []: /var/trac/myproject
Database encoding [UTF-8]:
Target project identifier []: myproject

Trac directory is the root directory of your Trac environment. Redmine will look in this directory for db/trac.db and attachments directory.
Target project identifier is the identifier of the Redmine project in which the data will be loaded (the project is created if not found).

4. The script migrates your data:

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

The script gives you the total number of migrated objects.
Now, you should see a project called Myproject in Redmine with your Trac data loaded in this project. You may need to enable the issue tracking and wiki modules in the project settings if the project was automatically created by the migration script.

Mantis

The Mantis importer migrates:

  • Users
  • Projects
  • Project versions, categories and news
  • Project memberships
  • Bugs
  • Bug notes, files, relations and monitors
  • Custom fields

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.

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.

Updated by Jean-Philippe Lang about 17 years ago · 5 revisions