Deployment Manager - cws-khuntly/WebSphere GitHub Wiki


date: 2025-05-08 15:28:39 created: 2025-05-08 15:28:32 categories:

  • WebSphere / Backups

Deployment Manager

Create backup date variable:

declare -x BACKUP_DATE_STAMP=$(date +"%d-%m-%Y_%H-%M-%S")

Export the environment variable:

declare -x ENV=XXX

Export the profile name:

declare -x PROFILE_NAME="dmgr"

Export the post-process name:

declare -x POST_PROCESS_NAME=XXX

Create the backup directory:

mkdir -pv /nfs/backup/${ENV}/profiles/${PROFILE_NAME}

Source setupCmdLine.sh:

source /opt/IBM/WebSphere/profiles/dmgr/bin/setupCmdLine.sh

Export the WAS_INSTALL_ROOT variable:

declare -x WAS_INSTALL_ROOT="/opt/IBM/WebSphere/AppServer"

Stop the deployment manager:

${USER_INSTALL_ROOT}/bin/stopManager.sh

Back up the existing property files:

cp ${USER_INSTALL_ROOT}/properties/soap.client.props ${HOME}/workspace/WebSphere/AppServer/properties/${ENV}/${PROFILE_NAME}/soap.client.props

Remove passwords from soap.client.props:

sed -i '' "s/com.ibm.SOAP.loginPassword=.*/com.ibm.SOAP.loginPassword=/g" ${USER_INSTALL_ROOT}/properties/soap.client.props

Clean up temporary files:

rm -rf ${USER_INSTALL_ROOT}/temp/* ${USER_INSTALL_ROOT}/wstemp/*

${USER_INSTALL_ROOT}/bin/clearClassCache.sh && ${USER_INSTALL_ROOT}/bin/osgiCfgInit.sh

Back up the profile:

${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -backupProfile -profileName dmgr -backupFile /nfs/backup/${ENV}/profiles/${PROFILE_NAME}/${PROFILE_NAME}-${POST_PROCESS_NAME}-backup.${BACKUP_DATE_STAMP};

Back up the full WebSphere filesystem:

tar -C /opt/IBM/WebSphere -cvf - ./profiles | gzip > /nfs/backup/${ENV}/AppServer/WebSphere-Profiles-full-backup-${POST_PROCESS_NAME}-${BACKUP_DATE_STAMP}.tar.gz

tar -C /opt/IBM/WebSphere -cvf - ./AppServer | gzip > /nfs/backup/${ENV}/AppServer/WebSphere-full-backup-${POST_PROCESS_NAME}-${BACKUP_DATE_STAMP}.tar.gz

Replace property files for the profile:

cp ${HOME}/workspace/WebSphere/AppServer/properties/${ENV}/${PROFILE_NAME}/soap.client.props ${USER_INSTALL_ROOT}/properties/soap.client.props

Start the deployment manager:

${USER_INSTALL_ROOT}/startManager.sh

⚠️ **GitHub.com Fallback** ⚠️