Top
ETERNUS SF AdvancedCopy Manager V15.0 Operation Guide

A.2.3 Customizing the shell script

The method of customizing the shell script for backup pre- and post-processing is explained below.


Backup a volume group

When you are backing up the volume group containing the logical volume used to build the file system, insert a comment character ("#") into line 75 of the pre-processing script (OpcBackup.pre) to remove the exit statement.

Note

  • Note that unmount/mount processing to a volume group is not carried out if the scripts have not been customized.

  • If the backup volume is a volume group, deactivate the backup volume during backup pre-processing.

  • Correct the parameters and options, of the OS commands, such as the mount command and the fsck command, appropriately for their use.


Cluster operation by VERITAS Cluster Server

Customization of the pre-processing and post-processing scripts is required when performing cluster operations using VERITAS Cluster Server, and when the mount point of the transaction volume is registered in the cluster transaction.
Change the unmount/mount processing in the pre-processing and post-processing scripts into offline/online processing of the mount point resource.
The mount point resource relating to the Volume is immediately offline/online whilst there will be a time delay before access is actually prevented when mount/unmount is used.
Please note that once the online/offline command is issued there will be a delay before the mount/unmount command can be executed. The sleep and df commands can be used to delay the mount/ unmount until after the process that sets the volumes online or offline has completed.

The examples below show how the pre-processing and post-processing scripts are modified.

[Example]
Changing the unmount processing of the backup pre-processing script (OpcBackup.pre)

[lines 85, 94, 116, 119 and 127]

(before change)

/usr/sbin/umount $mount_point

(after change)

/opt/VRTSvcs/bin/hares -offline resource-name -sys system-name
[Example]
Adding unmount wait processing to the backup pre-processing script (OpcBackup.pre)

[lines 114 and 148]

(addition)

mount_status="mounted"
while [ $mount_status = "mounted" ]
do
   mount_status=`/usr/sbin/mount | /usr/bin/nawk -v lv=/dev/XXXXX 'lv==$1{flag=1; exit;} END{if(flag==1) print "mounted"; else print "not_mounted";}'`
done
[Example]
Changing the mount processing of the backup post-processing script (OpcBackup.post)

[lines 88, 97, 121 and 130]

(before change)

/usr/sbin/mount $lvname $lv_mount_point

(after change)

/opt/VRTSvcs/bin/hares -online resource-name -sys system-name
[Example]
Adding mount wait processing to the backup post-processing script (OpcBackup.post)

[lines 115 and 148]

(addition)

mount_status="not_mounted"
while [ $mount_status = "not_mounted" ]
do
   mount_status=`/usr/sbin/mount | /usr/bin/nawk -v lv=$lvname 'lv==$1{flag=1; exit;} END{if(flag==1) print "mounted"; else print "not_mounted";}'`
done