Solved

How to backup huge data into multiple tape

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AIX 5.3 group password policy changes 7 29
how to monitor remote shell execution on linux 9 104
Oracle Finace 3 87
unix in java example 9 70
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
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.:

856 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