WebSphere Application Server(WAS)의
manageprofiles명령어를 사용하여 프로파일을 생성(Create), 삭제(Delete)하는 방법과 장애 대비를 위한 백업(Backup) 및 복구(Restore) 절차를 상세히 기술합니다.
1. 명령어 개요 및 위치
manageprofiles는 WAS의 인스턴스(프로파일) 생명주기를 관리하는 스크립트입니다.
- 위치:
[WAS_INSTALL_ROOT]/bin - 실행 파일:
manageprofiles.sh(Unix/Linux) 또는manageprofiles.bat(Windows)
2. 프로파일 생성 (Create)
서버의 역할에 따라 적절한 -templatePath를 지정해야 합니다.
주요 템플릿 경로 (templatePath)
- Dmgr (Deployment Manager):
.../profileTemplates/dmgr - AppServer (Managed Node):
.../profileTemplates/managed - Default (Standalone Server):
.../profileTemplates/default
예제 1: Deployment Manager (Dmgr) 생성
# Unix/Linux Line-breaking 예시
./manageprofiles.sh -create \
-profileName Dmgr01 \
-templatePath /IBM/WAS/AppServer/profileTemplates/dmgr \
-profilePath /IBM/WAS/AppServer/profiles/Dmgr01 \
-cellName WebSphereCell01 \
-nodeName WebSphereManager01 \
-hostName myhostname
예제 2: Application Server (Default) 생성
./manageprofiles.sh -create \
-profileName AppSrv01 \
-templatePath /IBM/WAS/AppServer/profileTemplates/default \
-profilePath /IBM/WAS/AppServer/profiles/AppSrv01 \
-hostName myhostname
3. 프로파일 백업 (Backup)
프로파일 레지스트리와 파일 시스템 및 메타데이터를 백업합니다. 반드시 해당 프로파일의 모든 프로세스를 정지한 후 수행해야 합니다.
구문
manageprofiles.sh -backupProfile -profileName [프로파일멍] -backupFile [저장할파일경로]
사용 예시
# AppSrv01 프로파일을 백업
./manageprofiles.sh -backupProfile -profileName AppSrv01 -backupFile /backup/AppSrv01_2023.zip
4. 프로파일 복구 (Restore)
백업된 파일을 이용하여 프로파일을 복원합니다. 복구 절차는 단순 덮어쓰기가 아니며, 레지스트리 정합성 검증 과정이 필요합니다.
복구 절차 (Step-by-Step)
- 프로세스 정지: 복원하려는 프로파일과 관련된 모든 서버 및 프로세스를 중지합니다.
- 디렉토리 삭제: 파일 시스템에서 기존 프로파일 디렉토리를 수동으로 삭제합니다. (예:
rm -rf /IBM/WAS/AppServer/profiles/AppSrv01) - 레지스트리 검증: 프로파일 레지스트리 정보를 정리합니다.
./manageprofiles.sh -validateAndUpdateRegistry - 복구 실행: 백업 파일을 사용하여 프로파일을 복원합니다.
./manageprofiles.sh -restoreProfile -backupFile /backup/AppSrv01_2023.zip
5. 프로파일 삭제 (Delete)
더 이상 사용하지 않는 프로파일을 시스템에서 제거합니다. 삭제 시 관련 디렉토리가 제거되며, 레지스트리 정보가 갱신됩니다.
옵션 설명
-delete: 특정 프로파일 하나를 삭제합니다.-deleteAll: 등록된 모든 프로파일을 일괄 삭제합니다.
사용 예시
# 특정 프로파일 삭제
./manageprofiles.sh -delete -profileName AppSrv01
# 모든 프로파일 삭제 (주의 요망)
./manageprofiles.sh -deleteAll
Next Step:
프로파일 복구가 완료되었다면, syncNode 명령어를 통해 Dmgr과 로컬 노드 간의 설정 동기화를 수행하여 데이터 불일치 문제를 사전에 방지하십시오.