Solstice Backup 5.1 Installation and Release Notes

ClearCase VOB 백업

예 1-1의 스크립트를 사용해서 ClearCase VOB(version object database)를 잠근 다음, 백업하고 VOB를 잠금 해제합니다. 사용자 정의 스크립트 파일은 Backup save 프로그램이 설치된 곳과 동일한 디렉토리에 존재해야 합니다. 예를 들어, Solaris 시스템에서 save 프로그램은 /usr/sbin/nsr 디렉토리에 설치됩니다. ClearCase VOB에 대해 구성한 클라이언트 자원의 Backup Command 속성에 스크립트의 이름을 입력합니다. 스케줄 백업을 하는 동안 일상적인 save 프로그램 대신 Backup Command가 호출됩니다.


예 1-1 ClearCase VOB 스크립트


#!/bin/sh# export the SHELL that we are going to use
SHELL=/bin/sh
export SHELL
# export the correct PATH so that all the required binaries can be found
case $0 in
/* ) PATH=/usr/atria/bin:/bin:/usr/bin:\Q/bin/dirname $0\Q
c=\Q/bin/basename $0\Q
;;
* )PATH=/usr/atria/bin:/bin:/usr/bin:/usr/sbin:/usr/bin/nsr:/usr/sbin/nsr
c=$0
;;
esac
export PATH
# These are the valid statuses which save reports on completion of the backup
statuses="
failed.
abandoned.
succeeded.
completed savetime=
"
# Perform the PRECMD (Lock VOB)
/usr/atria/bin/cleartool setview -exec "/usr/atria/bin/cleartoollock -c \
`VOB backups in progress' -vob /cm_data/mis_dev" magic_view >
/tmp/voblock.log 2>&1
# Perform backup on client
save "$@" > /tmp/saveout$$ 2>&
# cat out the save output
cat /tmp/saveout$$
# search for the backup status in the output reported by save
for i in ${statuses}; do
result=\Qgrep "${i}" /tmp/saveout$$\Q
if [ $? != 0 ]; then
echo ${result}
fi
done
# Perform the POSTCMD (Unlock VOB)
/usr/atria/bin/cleartool setview -exec "/usr/atria/bin/cleartoolunlock - vob
/cm_data/mis_dev" \
magic_view > /tmp/vobunlock.log 2>&
# make sure to gracefully exit out of this shell script
exit 0


주의 - 주의 -

백업이 발생하도록 스크립트에 save 명령어를 포함해야 합니다. 스크립트 파일이 save 프로그램과 동일한 디렉토리에 없으면 백업은 실패하게 됩니다.