Monday, June 25, 2007

Scripts for RAC backup

Just want to store them here for myself, but if others use them - well feel free (and drop me a note).

The script for the Cluster Registry

#!/bin/ksh

# Author: Andreas Chatziantoniou, Accenture Technology Solutions
# Date : 25-JUN-2007
#
# Purpose:
# Create a backup of the Oracle Cluster Registry regularly
#
# Usage:
# ./backup_oracle_crs.sh
#
# This script should be used from the cron in regular intervals
#
# Results:
# The backupfile of the Oracle Cluster Registry will be created in the /tmp
# directory. The filename will contain the hostname and the time that
# the backup was created.

OCRBCK=/tmp/ocrbackup.`hostname`.`date +"%Y%m%d%H%M"`
/opt/oracle/crs/bin/ocrconfig -export $OCRBCK

And here is the script for the Voting Disk
#!/bin/ksh

# Author: Andreas Chatziantoniou, Accenture Technology Solutions
# Date : 25-JUN-2007
#
# Purpose:
# Create a backup of the Oracle Voting Disk regularly
#
# Usage:
# ./backup_oracle_voting_disk.sh
#
# This script should be used from the cron in regular intervals
#
# Results:
# The backupfile of the Oracle Voting Disk will be created in the /tmp
# directory. The filename will contain the hostname and the time that the
# backup was created.
#
# TODO:
# If you have more than one voting disk make sure that each is copied.

OVDBCK=/tmp/ovdbackup.`hostname`.`date +"%Y%m%d%H%M"`
dd if=/dev/rhdiskpower2 of=$OVDBCK

No comments: