Changing your CSC Ultimate base installation

Currently I have CSC3 Ultimate installed with various frontends:



domain1.com (CSC3 is installed on this domain)

domain2.com (this is an addon domain that shows CSC frontend 2)

domain3.com (this is an addon domain that shows CSC frontend 3)

domain4.com (this is an addon domain that shows CSC frontend 4)



The installation contains a mass of data (products, store information, pages, etc.) that needs to be retained correctly.



Due to correct handing of payments I want to change this to:

domain5.com (CSC is installed on this domain)

domain1.com (this is an addon domain that shows CSC frontend 1)

domain2.com (this is an addon domain that shows CSC frontend 2)

domain3.com (this is an addon domain that shows CSC frontend 3)

domain4.com (this is an addon domain that shows CSC frontend 4)



Additionally I want to upgrade from CSC3 to CSC4 and migrate from a VDS installation to my dedicated server.



Does anyone know how to do this without creating a mess?

Should I change this first or upgrade first?