What are you doing in this scenario to export the existing relationships and import those to the new CI for the purpose of maintaining CMDB relationship integrity to the upstream and downstream CIs?
If you don't need auditing/reporting, as gbruneau said, it would be better to just update the current CI.
If you really need to audit the server swap, you may think of update the relationship table Business_Management.
First, you can extract the relationships as per the CI uuid.
pdm_extract -f "select id, hier_child, hier_parent from Business_Management
where hier_child = 0x508283A00693AF4D96DC4FB0EF41E468 or hier_parent = 0x508283A
00693AF4D96DC4FB0EF41E468" > swapci.txt
Second, modify swapci.txt and update all the old CI id to the new CI id.
Third, use pdm_load to update the relationship table.
And then you can inactive the old CI.
NOTE1: I don't verify it yet, please verify it on your test env first.
NOTE2: This method cannot keep the old relationships.
If the server will be the same host name then I don't see the point in creating a new CI and recreating the relationships. Why not just update the old CI with details about the new server.
In this case I would just log a change request against the CI and not worry about creating duplicates.
Thanks Zhijun, I was thinking that I would need to use pdm_extract in some way to see what the current relationships are, flip it, then send it back in with the new host. I will test this on our development environment for sure and report back here.
Thanks gbruneau, but there are frequently times when there is an overlap of time where the new server is online before the old one is retired. Therefore they are both LIVE on the wire for a period of time before the cutover. Otherwise, we would do what you suggest and it would be a simple move.
There is also a copy (including relationships) function directly in the menubar of the CI detail screen. You could use that to copy the old CI into a new one, update that one and maybe make some relationships inactive until the new machine actually replaces the old one.