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
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?
Solved
Here are the manual steps that I did to clone an existent profile.
Profiles/<oldProfile> to Profiles/<newProfile>
WAS_USER_SCRIPT in Profiles\<newProfile>\bin\setupCmdLine.bat
USER_INSTALL_ROOT in Profiles\<newProfile>\bin\setupCmdLine.bat user.root in Profiles\<newProfile>\properties\ssl.client.props
<oldProfile> with <newProfile> in Profiles\<newProfile>\firststeps\firststeps.bat
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"/>
AppServer\properties\fsdb\<oldProfile>.bat to AppServer\properties\fsdb\<newProfile>.bat. This step will make the profile available to "AppServer\bin\manageprofiles.bat -listProfiles"config/cells/<cell>/nodes/<node>/variables.xml. Update the USER_INSTALL_ROOT path.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.
Here is a build-in WebSphere solution. This works fine on WAS 8.5.5.3.
<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)$AdminTask exportWasprofile {-archive
<PATH/TO/PROFILE/EXPORT/ARCHIVE>}
<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)$AdminTask importWasprofile {-archive
<PATH/TO/PROFILE/EXPORT/ARCHIVE>-deleteExistingServers}
$AdminConfig save
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With