Solved

How to backup huge data into multiple tape

Posted on 2006-10-31
3
348 Views
Last Modified: 2013-12-27
Hi experts,
I have a huge amount of data size. I need to be able to backup the data into whatever number of dds4 tapes until finish. The requirement is, after first tape is full, it will prompt for next tape, until finish. This is part of my current script (currently it just terminated after the tape is full, without message). I'm using single tape drive:

cd /export/oradata/${ORACLE_SID}
BKUPDIRS="datafile index ctrl logfile $ORACLE_HOME/dbs archive"
export BKUPDIRS
4mm_backup.ksh

This is 4mm_backup.ksh script:

bkup2tape ()
{
        logfile=$HOME/log/4mmbkup.log
        rm -f $logfile

        echo "${tabs}PLEASE INSERT 4mm TAPE TO HOST"
        echo "${tabs}AFTERWARDS HIT ENTER TO PROCEED\c"
        read hold

        echo "${tabs}PLEASE WAIT FOR BACKUP TO COMPLETE"
        tar cvhf $TAPE_DEVICE ${BKUPDIRS} >$logfile 2>&1
        if [ $? -ne 0 ]
        then
                echo "${tabs}BACKUP TO TAPE FAILED"
                cd $HOME/log
                echo "${tabs}CONTENTS OF BACKUP LOG FILE"
                more $logfile
        else
                echo "${tabs}BACKUP TO TAPE SUCCESSFUL"
                echo "${tabs}EJECTING TAPE.."
                mt -f /dev/rmt/0 offline
                cp $logfile $logfile.`date '+%d-%m-%y_%H:%M:%S'`
        fi
}

# Main
if [ -n "$BKUPDIRS" ]
then
        bkup2tape $BKUPDIRS
fi

Hope you gurus can help.
TQ
0
Comment
Question by:Kerbeross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
ID: 17847115
tar can only do single-volume backup, you need to use "cpio" or "ufsdump to perform
multiple-volume tape backup.

eg:

you save a list of file name in filelist

cat filelist | cpio -oacv -O $TAPE_DEVICE

man cpio
man ufsdump
to learn more details.

also
please read this doc:
http://docs.sun.com/app/docs/doc/802-7675/6ib9g0f6h?a=view
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question