# Method to migrate a windows service from one server to another

I'm setting up a staging server to test out an upgrade of some critical software (IBM Rational Team Concert on WebSphere) I'm not going to be able to re-install the app as I don't have all the info and config used during the original install, so my plan is to copy over the necessary folders and copy over the services. I can't find anything which would let me export the definition of the service and import it onto another machine.

Websphere uses a few extra keys around and below the HKLM\CurrentControlSet\Services\Websphere reg entry, but nothing else in the registry.

My current plan is

• create a new service using sc create (using the same service name) on target
• export HKLM\CurrentControlSet\Services\Websphere from source
• import reg keys from above onto target
• start services

Can anyone see a problem with this approach or recommend a tool to handle this?

-
I would strongly advise you to contact IBM and ask them about possible migration paths. –  Oliver Salzburg Jul 5 '12 at 11:10

## migrated from superuser.comJul 17 '12 at 10:25

This question came from our site for computer enthusiasts and power users.

Here's what I did in order to clone our live RTC and RQM server onto a staging environment, in case this applies to anyone else:

1. Copy all folders containing RTC/RQM/WebSphere onto the target machine, keeping the paths the same. In our case that was c:\program files\IBM and c:\program files(x86)\IBM

2. Create services with the same name as the WebSphere services on the source machine (we had one service for RQM and one for RTC. I used sc create "IBMWAS70Service - SERVERNode01" binpath=c:\path\to\any\exe

3. Export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\IBMWAS70Service - SERVERNode01 from the source machine. You'll need to do this for each service you have.

4. Import these registry files onto the target machine

5. Our source server had been set up with a system environment variable called ORACLE_JDBC which pointed to a folder containing ojdbc14.jar. Re-create this variable on the target. This path was also in the system PATH environment variable, so I added it there too.

6. Delete c:\windows\temp\_jazz* and c:\windows\temp\_.com_ibm* folders.

7. We consolidated all databases into one database with different schemas. This caused locking errors when we tried to start both RTC and RQM. This is caused by both programs sharing the same temp folder. I edited server.xml (at \WebSphere\AppServer1\profiles\AppSrv01\config\cells\SERVERNode02Cell\nodes\SERVERNode02\servers\server1). I added this to the java properties section near the end of server.xml <systemProperties xmi:id="olm_stage1" name="java.io.tmpdir" value="c:/temp" required="false"/>

8. Edit c:\windows\system32\drivers\etc\hosts and create entries for your DB server(pointing to your staging DB server) and the rtc and rqm addresses (pointing to the staging machine itself)

9. Start services

-