Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clone a WebSphere 8 profile

I would like to clone an existing profile, start the server and modify it via the Admin Console.

I already read the IBM documentation about

 manageprofiles.bat

but the manageprofiles tool does not contain something like:

 # would be nice if a clone action exists
 manageprofiles.bat -clone -profileName base -targetProfileName base1

This is what I need and I don't see a way to achieve this. The tool can create, delete, backup and restore a profile.

What I already tried

  1. Copied the profile directory and renamed it
  2. Edited the paths in the bin/setupCmdLine.bat
  3. Added the profile to the AppServer/properties/profileRegistry.xml
  4. Executed manageprofiles -validateAndUpdateRegistry

But the profile is still not recognized by WAS. I can verify this by executing

manageprofiles -listProfiles

How do you clone or copy profiles?

Is there a manual way?

If so, which files in the profile's dir must be edited?

like image 596
René Link Avatar asked Jul 08 '13 11:07

René Link


2 Answers

Solved

Here are the manual steps that I did to clone an existent profile.

  1. Make shure that the server is shutdown.
  2. Copy the existent profile from Profiles/<oldProfile> to Profiles/<newProfile>
  3. Update Path WAS_USER_SCRIPT in Profiles\<newProfile>\bin\setupCmdLine.bat
  4. Update Path USER_INSTALL_ROOT in Profiles\<newProfile>\bin\setupCmdLine.bat
  5. Update property user.root in Profiles\<newProfile>\properties\ssl.client.props
  6. Replace all occurences of <oldProfile> with <newProfile> in Profiles\<newProfile>\firststeps\firststeps.bat
  7. Edit AppServer\properties\profileRegistry.xml. Make a copy of the <oldProfile> and update the tag values with the <newProfile>. Should look something like this: <profile isAReservationTicket="false" isDefault="false" name="newProfile" path=".....\Profiles\newProfile" template=".......\AppServer\profileTemplates\default"/>
  8. Copy AppServer\properties\fsdb\<oldProfile>.bat to AppServer\properties\fsdb\<newProfile>.bat. This step will make the profile available to "AppServer\bin\manageprofiles.bat -listProfiles"
  9. Edit config/cells/<cell>/nodes/<node>/variables.xml. Update the USER_INSTALL_ROOT path.
  10. Update the path of WAS_USER_SCRIPT in AppServer\properties\fsdb\<newProfile>.bat

This worked for me. Please comment or vote to let me know if it also worked for you.

like image 186
René Link Avatar answered Oct 24 '22 07:10

René Link


Here is a build-in WebSphere solution. This works fine on WAS 8.5.5.3.

  1. Run your application server in source profile
  2. Run command line utility by running script <WAS_INSTAL_ROOT>/AppServer/profiles/<YOUR_SOURCE_PROFILE>/bin/wsadmin.sh or <WAS_INSTAL_ROOT>/AppServer/profiles/<YOUR_SOURCE_PROFILE>/bin/wsadmin.bat (on Windows machines)
  3. Execute command in this utility:

    $AdminTask exportWasprofile {-archive <PATH/TO/PROFILE/EXPORT/ARCHIVE>}

  4. Create new target profile or use existing and run application server on it
  5. Run command line utility for target profile by running script <WAS_INSTAL_ROOT>/AppServer/profiles/<YOUR_TARGET_PROFILE>/bin/wsadmin.sh or <WAS_INSTAL_ROOT>/AppServer/profiles/<YOUR_TARGET_PROFILE>/bin/wsadmin.bat (on Windows machines)
  6. Execute command to import profile settings into target profile in this utility:

    $AdminTask importWasprofile {-archive <PATH/TO/PROFILE/EXPORT/ARCHIVE> -deleteExistingServers}

  7. Execute command to save new settings into target profile in this utility:

    $AdminConfig save

like image 30
user3243105 Avatar answered Oct 24 '22 08:10

user3243105