Merging two instances

Hello everyone,

I was hoping you could advise me on the RT migration issue we have encountered here at Parallels:

We would like to merge one RT (old one) database in to another RT (new one) without losing any tickets or user data.
These both RTs have about the same number of existing tickets (about 400k) and these tickets numbers are conflicting with each other.
I’ve scrolled through the Wiki and the Lists, but failed to locate any data on the matter.

Does anyone have experience of performing such a merge? I’d appreciate any recommendations and solution to make sure we do not lose any old RT data when moving to the new RT.
Tricky issues that I see, apart from the id conflicts are:

  1.  the 'old' RT is 3.6.5 while the 'new' one's 3.4. Don't ask why=)
    
  2.  the conflicts in user emails can exist. Customers could be registered in both RT instances prior to merging.
    

Thanks in advance,
Sincerely
Konstantin

Hi Konstantin,

We would like to merge one RT (old one) database in to another RT (new one) without losing any tickets or user data.
These both RTs have about the same number of existing tickets (about 400k) and these tickets numbers are conflicting with each other.
I’ve scrolled through the Wiki and the Lists, but failed to locate any data on the matter.

I’d guess that’s because this is something of a corner case!

Does anyone have experience of performing such a merge? I’d appreciate any recommendations and solution to make sure we do not lose any old RT data when moving to the new RT.
Tricky issues that I see, apart from the id conflicts are:

  1.  the 'old' RT is 3.6.5 while the 'new' one's 3.4. Don't ask why=)
    

You could leave the old tickets on 1 -> 400,000; increment the second
install IDs by +500,000 and then have ‘new’ tickets appearing after the
migration start around the 1,000,000 mark I suppose?

  1.  the conflicts in user emails can exist. Customers could be registered in both RT instances prior to merging.
    

I don’t believe there are any scripts for this out there, so I guess
you’ll need to hack up something to ensure ‘clean’ merging of users,
plus all the references to updated IDs remain intact?

Someone else might have better tips!

Alex

Hello everyone,

I was hoping you could advise me on the RT migration issue we have encountered here at Parallels:

We would like to merge one RT (old one) database in to another RT (new one) without losing any tickets or user data.
These both RTs have about the same number of existing tickets (about 400k) and these tickets numbers are conflicting with each other.
I’ve scrolled through the Wiki and the Lists, but failed to locate any data on the matter.

Does anyone have experience of performing such a merge? I’d appreciate any recommendations and solution to make sure we do not lose any old RT data when moving to the new RT.
Tricky issues that I see, apart from the id conflicts are:

  1.  the 'old' RT is 3.6.5 while the 'new' one's 3.4. Don't ask why=)
    

That’s actually unlikely to be a huge issue, actually.

  1.  the conflicts in user emails can exist. Customers could be registered in both RT instances prior to merging.
    

Also, the fact that all of the subsidiary records are going to conflict
as well. We started on a merge tool once, but didn’t get far on it since
it was just a thought experiement at the time.

-j

Jesse, Alex,
I really appreciate you digging into the issue!

Yes, the transactions, groupmembers and othe subrecords’ ids could vary significantly between the two instances, so this is the main issue.
Well it does sound quite discouraging that even the BestPractical team gave up the idea=)

Our business task is two transfer half of the support team from one instance to another, which the rest of the staff uses. If we cannot merge the databases, we face a transactional period, when either
a) engineers have to work in both instances,
b) all the ‘In progress’ tickets from the old instance get CC of the new instance and thus, once a correspondence is added to ticket, a new one is created on the second instance.

I guess, we’ll stick with b.
Unless that way the mailgate doesn’t get confused routing emails that have something like “[Helpdesk2 #222222] RE: [HelpDesk1 #111111] Blah-blah” in subject.

Thanks again!

KostyaFrom: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: Thursday, January 31, 2008 7:57 PM
To: Konstantin Naryzhniy
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Merging two instances

Hello everyone,

I was hoping you could advise me on the RT migration issue we have encountered here at Parallels:

We would like to merge one RT (old one) database in to another RT (new one) without losing any tickets or user data.
These both RTs have about the same number of existing tickets (about 400k) and these tickets numbers are conflicting with each other.
I’ve scrolled through the Wiki and the Lists, but failed to locate any data on the matter.

Does anyone have experience of performing such a merge? I’d appreciate any recommendations and solution to make sure we do not lose any old RT data when moving to the new RT.
Tricky issues that I see, apart from the id conflicts are:

  1.  the 'old' RT is 3.6.5 while the 'new' one's 3.4. Don't ask why=)
    

That’s actually unlikely to be a huge issue, actually.

  1.  the conflicts in user emails can exist. Customers could be registered in both RT instances prior to merging.
    

Also, the fact that all of the subsidiary records are going to conflict
as well. We started on a merge tool once, but didn’t get far on it since
it was just a thought experiement at the time.

-j

I guess, we’ll stick with b.
Unless that way the mailgate doesn’t get confused routing emails that have something like “[Helpdesk2 #222222] RE: [HelpDesk1 #111111] Blah-blah” in subject.

It’s worth looking at RT::Extension::ExtractSubjectToken to make sure
the mailgates do the right thing.

-jesse

Alex Howells wrote:

Hi Konstantin,

We would like to merge one RT (old one) database in to another RT (new one) without losing any tickets or user data.
These both RTs have about the same number of existing tickets (about 400k) and these tickets numbers are conflicting with each other.
I’ve scrolled through the Wiki and the Lists, but failed to locate any data on the matter.

I’d guess that’s because this is something of a corner case!

You’ve not noticed that periodically you get sysadmins asking “how do I
merge two RT systems” ? It’s not that uncommon, there have been 2 in
the last month.

Personally I was able to get people to agree that the important data was
the ticket data, and as long as the ticket history was there, then they
could live with merging the live tickets that would end up with 2 ids,
since one of the subject headers would just be ignored by RT.

At the minute I’m halfway through writing scripts to do the merge…
Basically dumping the data out into xml, changing user ids to email
addresses, then reimporting. But I’ve hard coded mappings of queue ids,
and created the new queues on the target system.

I can see why shifting down a version’s going to be a pig, but with the
export/import method it might even work.

Mark
Mark Chappell
Unix Systems Administrator