Skip to content


Błyskawiczna Kopia danych używając SVC FlashCopy i TSM

Naj mi znać jak będziesz potrzebował polskiej wersji

 #!/usr/bin/ksh
#
# this script sets the stage for FlashCopy backups
# it is executed from cron before database backup starts
# by W.M. Duszyk 10/10/05
#
DSCLI=’ssh admin@SVC_IP_address’
LOGGER(){
        echo “`date` $@” >> /tmp/FlashCopyBackup.log.`date | awk ‘{print $2$3}’`
}
LOGGER “Preparing FlashCopy”
$DSCLI svctask prestartfcconsistgrp GRP_NAME

#!/usr/bin/ksh93
#
# Waldemar Mark Duszyk
#
DSCLI=’ssh admin@SVC_IP_Address
VG[1]=’first_vg’
VG[2]=’second_vg’

FrozenTime=120

Logger() {
        echo “‘date’ $@” >> /tmp/FlashCopyBackup.log.’date | awk ‘{print $2$3}”
}

##

for vg in ${VG[1]} ${VG[2]}
do
  for filesystem in ‘lsvg -l $vg | grep -w jfs2 | grep -v grep | awk ‘{print $7}”       
     do
       chfs -a freeze=$FrozenTime $filesystem
       F100_log “File system $filesystem frozen.”
      done
done
        Logger “Starting Consistency Group”
        $DSCLI svctask startfcconsistgrp EPCPRDFC1

## and now the Data Base file systems will be thawn
for vg in ${VG[1]} ${VG[2]}
do
  for filesystem in ‘lsvg -l $vg | grep -w jfs2 | grep -v grep | awk ‘{print $7}”
    do
      chfs -a freeze=0 $filesystem
      Logger “File system $filesystem thawned.”
    done
done

Posted in scripts.

Tagged with , , , , , , , , .


2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jerry Garcia says

    I am in the process of moving from FastT storage to SVC controlled storage. I initiate the FastT flashcopy from theAIX host. Moving to the SVC environment I still want to control stopping the application (Epic) and initiating the flashcopy and the TSM backup from the host. Do you have any examples of that scenario? Great posting!

  2. MarekD:-) says

    Jerry, after FlashCopy consistency group is “made”, at the backup time, you “freeze” Epic (if you do not have EPIC backup script that “FREEZES all CACHE.DAT ask them to give you one). While EPIC is frozem, then you need to freeze AIX file systems that the CACHE.DATs are in to write any of their buffers to disks. Next, you execute a SNAP and thaw AIX file systems, and then you thaw EPIC using epic command.
    Finally, at a convinient moment, you use the SnapShot disks to recreate vg(s), mount their file systems (with a prefix) and do the backup.
    The last part, I execute on the TSM server – as I do not wanted to push the backup over the NET to the TSM Server – I do it directly on TSM Server.

    I hope it helps,

    MarkD:-)



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.