Search code examples
webspherewebsphere-8

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?


Solution

  • 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.