Solved

How to backup huge data into multiple tape

Posted on 2006-10-31
3
342 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
prtdiag report hdd failure 10 137
Move nodes from one TSM to another. 3 61
UNiX Script filesystem space usage Part2 54 79
MarkLogic 1 69
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now