home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.oracle
- Path: sparky!uunet!walter!qualcom.qualcomm.com!athena!kpalm
- From: kpalm@athena.qualcomm.com (Kent Palm)
- Subject: Re: dd backup of databases on a raw device
- Message-ID: <kpalm.720318029@athena>
- Sender: news@qualcomm.com
- Nntp-Posting-Host: athena.qualcomm.com
- Organization: Qualcomm, Inc., San Diego, CA
- References: <BwsuJo.C5@news.orst.edu>
- Date: Thu, 29 Oct 1992 00:20:29 GMT
- Lines: 37
-
- Here's a little excerpt from my backup script that might help. I've left out
- some things (e.g., variable assignments), but you can easily set them up.
-
- #!/bin/sh -h
- #-------------------------------------------------------------------------------
- CopyThisFile()
- {
- # Begin copying from the raw devices to the tape drive.
- #
- # Don't use a bs size > 32. Larger block sizes are less reliable.
- # Also, the bs must be a multiple of the Oracle block size (i.e., 2048)
- #
- echo "Copying the ${File} File/Tablespace (${ORACLE_SID})..." | tee -a ${BackupLog}
- echo " Start: `date`." | tee -a ${BackupLog}
- mt -f ${OutputDevice} status >> ${BackupLog} 2>&1
- dd if=${InputFile}\
- of=${OutputDevice}\
- bs=${BlockSize}\
- count=${Count} >> ${BackupLog} 2>&1
- echo " Finish: `date`." | tee -a ${BackupLog}
- return
- }
- #-------------------------------------------------------------------------------
- if [ "${BackupType}" = "Cold" ]
- then
- File=CONTROL InputFile=${CONTROL} BlockSize=32k Count=999999
- CopyThisFile
- fi
- #--------------------
- File=REDO1 InputFile=${REDO1} BlockSize=32k Count=999999
- CopyThisFile
- #--------------------
- File=REDO2 InputFile=${REDO2} BlockSize=32k Count=999999
- CopyThisFile
- #--------------------
- File=Pfile InputFile=${PFILE} BlockSize=32k Count=999999
- CopyThisFile
-