Solved

How to backup huge data into multiple tape

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

756 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