Migrating from Trac to Redmine (on Dreamhost)

I recently switched a couple of side projects I had hosted with Dreamhost from Trac to Redmine.  The process was surprisingly easy.

Even though the actual migration was easy, it took me a long time (almost longer than my patience would tolerate) to find the command that would do the import of wiki data, tickets, milestones, etc. In an effort to pull another soul out of the time suck that is ‘googling for a quick how-to’, here’s a quick how-to:

I use Dreamhost, but these commands should be adaptable to any hosting environment with an ssh terminal.

$cd your.redmine.subdomain
$rake redmine:migrate_from_trac RAILS_ENV="production"

Trac directory []: /home/.orchid/path/to/your/trac_site
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: mysql
Trac database host [localhost]: mysql.your_hostname.com
Trac database port [3306]:
Trac database name []: trac_db
Trac database schema [public]:
Trac database username []: trac_db_username
Trac database password []: trac_db_password
Trac database encoding [UTF-8]: latin1
Target project identifier []: redmine-project-id

This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n] y

Migrating components....
Migrating milestones..
Migrating custom fields
Migrating tickets........
Migrating wiki........................

Components:      4/4
Milestones:      2/2
Tickets:         8/8
Ticket files:    0/0
Custom values:   0/0
Wiki edits:      24/24
Wiki files:      1/1

The import works pretty well. The only big thing I noticed missing so far is “reply-formatted” text in the wiki page:

 > wiki text that begins with a greater-than sign to indicate e-mail
 > replies did not get imported.

Hope it’s helpful!

This entry was posted in Software Development and tagged , , , , , .
Bookmark the permalink.
Follow any comments here with the RSS feed for this post.
Both comments and trackbacks are currently closed.

librarian, writer/editor, floundering guitarist, breakfast addict

mobile software developer, dog owner, hiker, adventure racer, enemy of bureaucracy
Follow sam2themax on Twitter Subscribe to this blog