If you are not sure what a profile is, refer to this article.
There are a number of options can be be used with the manageprofiles.sh (Linux) or manageprofiles.bat (Windows) script.
- Backup a profile (-backupProfile)
- Create a new profile (-create)
- Delete a profile (-delete) (this article)
- Determine if a profile is valid in the registry (-validateRegistry)
- Determine if a profile is valid in the registry and updae (-validateAndUpdateRegistry)
- List profiles (-listProfiles)
- List default profile (-getDefaultName)
- List profile path (-getPath)
- Restore a profile (-restoreProfile)
Before deleting a profile, you will almost always want to use the manageprofiles.sh (Linux) or manageprofiles.bat (Windows) command with the -listProfiles option to list the profiles on the system. In this example, there are two profiles, AppSrv01 and AppSrv02.
~]# ${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -listProfiles
[AppSrv01, AppSrv02]
If the profile contains a node server, the stopNode command would be used to stop the node before the profile is backed up.
${WAS_INSTALL_ROOT}/profiles/your_profile/bin/stopNode.sh
Or if the profile contains a deployment manager, the stopManager command would be used to stop the deployment manager before the profile is backed up.
${WAS_INSTALL_ROOT}/profiles/your_profile/bin/stopManager.sh
You should always back up the profile before you delete the profile.
${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -backupProfile -profileName profile001 -backupFile /path/to/backup.xml
Then use the following command to delete the profile.
${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -delete -profileName profile_name
The following will be displayed if the profile is successfully deleted.
INSTCONFSUCCESS: Success: The profile no longer exists.
Validate and update the registry.
${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -validateAndUpdateRegistry
After the profile has been deleted, you may want to delete the remaining profile files.
AVOID TROUBLE
You always want to use manageprofiles.sh to delete a profile before removing the profile directory. You do not want to remove the profile directory from the server without first deleting the profile, as this will cause an incomplete removal situation. For example, if you remove the profile directory, manageprofiles.sh -listProfiles will still believe that the profile exists.
rm -rf ${WAS_INSTALL_ROOT}/profiles/your_profile_name
Did you find this article helpful?
If so, consider buying me a coffee over at