Solved

How to backup huge data into multiple tape

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

757 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

21 Experts available now in Live!

Get 1:1 Help Now