[rt-users] Moving a queue between RT servers

Emmanuel Lacour elacour at easter-eggs.com
Fri Oct 8 16:43:17 EDT 2010


On Fri, May 07, 2010 at 09:54:38PM +0200, Emmanuel Lacour wrote:
> On Fri, May 07, 2010 at 11:41:57AM -0400, Edna Wigderson wrote:
> > Hello,
> > 
> > We need to move an RT queue from one production server to another due to
> > internal reorganization. Both servers run RT 3.8.x . So a mysql dump &
> > restore of the tickets in the queue will be problematic as it might
> > cause ticket # conflicts.
> > 
> > Is there any easy/clean way of doing this?
> > 
> 
> I'm just working on this and have to finish next week ;)
> 
> I'm writing a script using sql on source DB and RT api on target DB.
> 
> Of course, tickets Id will be changed, but I plan to record the old
> ticket in a CF. for reference.
> 

As this may be useful for someone else, here is the script I made to
copy some queues from an RT 3.4.5 to an RT 3.8.8 with MySQL (should work
with most src RT >= 3.4.0 and target RT 3.8.x).

It is intended to be run on the target (RT 3.8.x). It will do some
direct sql to the src RT and create tickets in the target RT using the
RT API.

There is some limitations written at top of the script.

It's a one shot script that is in the state of "it worked here, may be it
can be usefull for you".

of course, there is no warranty that it may not destroy all your datas
...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sync-tickets.pl
Type: text/x-perl
Size: 33525 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20101008/fac96211/attachment.pl>


More information about the rt-users mailing list