Trac import into an Existing Redmine Site

Added by Chris Platts 16 days ago

Hi,

Is there any workaround to the requirement that a migration from Trac be done with an empty Redmine installation?

I'd really like to bring an existing Trac project into our live and much-used Redmine system. Perhaps I could do the migration into a second, fresh Redmine installation - then import from that Redmine site to the 'live' one?


Replies

RE: Trac import into an Existing Redmine Site - Added by Carl Nygard 16 days ago

One of the problems is that the id's of internal issue links, and especially subversion commit messages are still tied to the original id's in trac. If your redmine installation is using the same issue ids, you'll get massive confusion.

I had the same issue with importing an existing bugzilla, and I solved it by resetting the current issue id in the redmine database above the last bugzilla issue id, then did the import. Of course, I had to write the importer myself, so I had control over some of these issues, but if I hadn't set the redmine issue id, it would have been impossible.

YMMV

RE: Trac import into an Existing Redmine Site - Added by Chris Platts 16 days ago

Thanks for the reply!

Luckily, my requirements are relatively straightforward. I'd be quite satisfied with simply the ticket information (without even the updates) and the status. There are only a handful of ticket reporters and assignees which I could easily hard-code.

My DB skills lie in .NET, not PHP or Ruby, sadly (I'm working on fixing that! :-). There are ADO.NET providers available for both MySQL (which I'm using with Redmine) and SQLite (Trac). I think I might try to start out with those and see how far I get!

I'm on a one-man mission to move my colleagues from the dreaded Visual Source(un)Safe. I've been using Redmine+SVN for a month now and the difference is like night & day. Since the project was stuck in SourceSafe, we'd not used Trac's SVN integration. I'm hoping to move the codebase to SVN and the issue/feature tracking for that project from Trac to Redmine.

Even if the ticket migration isn't feasible, I'll go as far as manually re-entering currently active tickets just to get us all on the same Redmine+SVN platform and rescue my sanity :)

RE: RE: Trac import into an Existing Redmine Site - Added by Carl Nygard 15 days ago

In that case, since it doesn't seem that you have any commits that reference your issue ids, you can probably use the stock trac importer. You may want to look through the code, and perhaps remove some of the stuff it's doing, like registering users automatically or whatnot. But the key is the trac importer figures out what the new issue id will be in redmine, and makes efforts to re-write references in docs and wiki pages accordingly. I don't think you'll have a huge problem understanding the flow and what to do. Just do it with a test database a few times until you're sure it's going well.

BTW, someone may correct me, but I believe the only reason why the trac migration should be done with an empty redmine install is because of the issue id rewriting problem I mentioned earlier. I believe the code takes steps to only add certain items (like users) if they don't already exist.

RE: Trac import into an Existing Redmine Site - Added by Chris Platts 15 days ago

Thanks Carl -- I'll look at the existing importer first. Better to tweak something that already works than re-invent the wheel.

I'll grab a copy of the redmine database at work today and see what I can do over the weekend.

Cheers,
Chris