Restoring links after upgrade?

About a week after after upgrading our RT install from 2.x to
3.4.1, on of my co-workers noticed that a lot of the links hade had
previously made between tickets are now gone. After looking at the
database tables, it appears that about 500 out of 1000 links didn’t
get imported, and the ones that did get imported have a Base/Target of instead of what it should be. New
links created since the upgrade are correct.

So, my question is: is there an easy way to recover the old links?
I’ve written a script that just uses plain old DBI to transfer over the
old to the new, changing the Base/Target as necessary. Is this a bad
thing to do? My plan is to kill all the invalid links in the RT3 install,
and then import everything from the RT2 install that is not in RT3.

Any advice is greatly appreciated.