2

I want to import silently server configuration (such as Applications servers -> Process Definition -> Java Virtual Machine -> Generic JVM arguments etc.).

I've tried wsadmin tool, but it requires WSA to be running - and this is bad for me, because I need to write script that copies these settings without any interaction.

wsadmin -lang jython -c "AdminTask.importWasprofile('[-archive d:\profil2.car]')"

Another way was the "Import server configuration from server..." option in Eclipse context menu (Servers tab), but it still needs interaction from user.

Is there any way to copy those settings? Should I copy some files or something?

I'm installing Rational Application Developer 7.0.0.7. I have also generated .car file with exported settings.

deem
  • 1,252
  • 1
  • 19
  • 38
  • 2
    If you're modifying a local profile, you can use `wsadmin -conntype none` so that you don't need to have a server running. Have you tried that? – Brett Kail Aug 21 '15 at 17:27
  • Well, it didnt show any error but it seems like .car files do not contain those settings as they are not imported. Do you know, how to export those settings properly? 1) Application servers > server1 > Process Definition > Java Virtual Machine > Custom Properties, 2) JMS providers > Default messaging provider > Connection factories 3) Buses? – deem Aug 24 '15 at 08:19
  • Okay, I've inspected this better now and all I can say: big thanks, @bkail ! I just checked "Buses" section, sadly - only it wasn't copied. By any chance, do you know, how to copy Buses? [Here](http://stackoverflow.com/questions/2568022/how-to-export-was-6-1-server-configuration) I've found something useful, but I don't have `cells//buses/*` nor `cells//nodes//servers/server1/sib-engines.xml`, maybe because I am using RAD 7.0.0.7 – deem Aug 24 '15 at 14:44
  • I don't know very much at all about buses/SIB, sorry. – Brett Kail Aug 24 '15 at 15:12

1 Answers1

2

Ok, I've managed to import all those settings silently.

First, you have to export profile using f.e. wsadmin script.

Command

wsadmin -lang jython -c "AdminTask.exportWasprofile(['-archive', 'd:\sampleProfileName.car'])

Will export default profile to .car file (which is, in fact, .zip file with other extension). It is nice to add here, that my version of WAS wouldn't export SIB settings.

Importing those settings is as easy, as exporting, you just have to run command

wsadmin -lang jython -conntype none -c "AdminTask.importWasprofile('[-archive d:\sampleProfileName.car]')"

Note using -conntype option, as @bkail mentioned

Sadly, WAS 6.x and earlier does not support exporting/importing SIB settings (as mentioned HERE). In order to copy them, you have to add manually to .car file buses directory (as mentioned HERE). The problem is - adding them by admin console didn't create this directory for me.

I had to use another wsadmin script that creates SIB - I've found it HERE. It simply uses AdminTask object to create bus manually - and thanks to it, it created the buses directory.

Hope this helps somebody who has the same problem as I had - and it will save him MANY hours.

Greetings.

Community
  • 1
  • 1
deem
  • 1,252
  • 1
  • 19
  • 38