ETERNUS SF AdvancedCopy Manager 運用手引書 テープバックアップ連携編 13.3 -Microsoft(R) Windows(R) 2000/Microsoft(R) Windows Server(R) 2003/Microsoft(R) Windows Server(R) 2008-, -Solaris-, -HP-UX-, -Linux-, -AIX-
目次 索引 前ページ次ページ

付録A バックアップ/リストア/テープコピーの前後処理> A.4 テープコピーの前後処理

A.4.4 Linuxのテープコピー実行時の後処理

テープコピー実行時の後処理のシェルスクリプト名は、以下のとおりです。

シェルスクリプトの内容は、以下のとおりです。

  1:   #!/bin/sh
  2:   
  3:   # AdvancedCopy Manager
  4:   # All Rights Reserved, Copyright FUJITSU LIMITED, 2005-2007
  5:   
  6:   #
  7:   #   Postprocessing of tape copy processing
  8:   #
  9:   #Argument: $1 Device name of backup disk
 10:  #      $2 Reserve
 11:  #
 12:  #Error number
 13:  # 2: Argument error
 14:  
 15:  # Argument check
 16:  case $# in
 17:  1)
 18:  ;;
 19:  2)
 20:  ;;
 21:  *)
 22:  exit 2
 23:  ;;
 24:  esac
 25:  
 26:  device="`echo $1`"
 27:  
 28:  # Determination of postprocessing file name
 29:  
 30:  if [ "$SWSTGNODE" != "" ]
 31:  then
 32:  swstg_node="/`echo $SWSTGNODE`"
 33:  else
 34:  swstg_node=""
 35:  fi
 36:  
 37:  err_log_path="/var/opt/FJSVswsts"$swstg_node"/log"
 38:  
 39:  if [ "`echo $device | /bin/grep "/dev/sd"`" != "" ]
 40:  then
 41:  # /dev/sd? -> sd?
 42:  dev="`echo $device | /bin/sed "s/\/dev\///"`"
 43:  elif [ "`echo $device | /bin/grep "/dev/FJSV"`" != "" ]
 44:  then
 45:  # /dev/FJSVmphd/dsk/mplb?s? -> mplb?s?
 46:  # /dev/FJSVmphd/dsk/mphd?s? -> mphd?s?
 47:  dev="`echo $device | /bin/cut -d/ -f5`"
 48:  elif [ "`echo $device | /bin/grep "/dev/sfdsk/"`" != "" ]
 49:  then
 50:  # /dev/sfdsk/class/dsk/volume -> _gds_class_volume
 51:  dev="_gds_`echo $device | /bin/sed "s/\/dev\/sfdsk\///"`"
 52:  dev="`echo $dev | /bin/sed "s/\/dsk\//_/"`"
 53:  elif [ "`echo $device | /bin/grep "/dev/disk/by-id/"`" != "" ]
 54:  then
 55:  # "/dev/disk/by-id/<device>" -> "_by-id_<device>"
 56:  dev="_by-id_`echo $device | /bin/sed "s/\/dev\/disk\/by-id\///"`"
 57:  elif [ "`echo $device | /bin/grep "/dev/disk/by-path/"`" != "" ]
 58:  then
 59:  # "/dev/disk/by-path/<device>" -> "_by-path_<device>"
 60:  dev="_by-path_`echo $device | /bin/sed "s/\/dev\/disk\/by-path\///"`"
 61:  else
 62:  exit 0
 63:  fi
 64:  post_file="/etc/opt/FJSVswsts"$swstg_node"/data/DEFAULT/"$dev".pre"
 65:  
 66:  # Confirmation of postprocessing
 67:  if [ ! -r $post_file ]
 68:  then
 69:  exit 0
 70:  fi
 71:  /bin/rm -f $post_file 2> /dev/null
 72:  
 73:  exit 0

目次 索引 前ページ次ページ

All Rights Reserved, Copyright(C) 富士通株式会社 2000-2008