1822147 Members
4134 Online
109640 Solutions
New Discussion юеВ

copy of backup tape

 
Dottie Lopomo
Occasional Contributor

copy of backup tape

I am coping a backup tape for a software vendor and they told me that I need to use the tar command. Anyone have any advice or suggestions on doing this, this is a large backup and when I do it there won't be much time.

Thanks
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: copy of backup tape

Are you doing a tape-to-tape copy? If so then the command you use to copy the tape will depend greatly on how the backup was written to tape.

If it was written via cpio, fbackup, OmniBack then tar will not do you much good.

You probably should be looking instead at the 'dd' command (man dd for more info) to make a copy like they are requesting.
harry d brown jr
Honored Contributor

Re: copy of backup tape

Dottie,

When you say LARGE backup, do you mean a lot of files, or files that are HUGE, say over 2GB in size?

TO use tar: "man tar"

tar -cvf /dev/rmt/tapedrive ./directory2backup

Where /dev/rmt/tapedrive can be /dev/rmt/0m

live free or die
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: copy of backup tape

Hi Dottie:

You question is not quite clear. Are you trying to make a copy of an existing backup or do you want to make a tar backup of software on disk?

If you want to copy an existing backup then your question has very little meaning. It would have to be in whatever format your existing backup is in. (You could resore your existing backup and then do a tar from the restored files. In that case, the answer is the same as making a normal tar backup.

1) cd to desired directory
2) tar cvf /dev/rmt/2m .
(Output to /dev/rmt/2m copying everying in the current working directory and below ('.').

Man tar for more details.

Because you mentioned this was a large backup, you should be aware of the 2GB filesize limit of the native version of tar. You might want to use the Gnu version of tar which is available from: http://hpux.cs.utah.edu/hppd/hpux/Gnu/tar-1.13.25/
If it ain't broke, I can fix that.
harry d brown jr
Honored Contributor

Re: copy of backup tape

Dottie,

After reading Patrick's response, if you are attempting to COPY a backup tape to another tape, then the FORMAT and SIZE of that ORIGINAL backup is critical. tar can NOT backup (copy) OBJECTS that are greater than 2GB - only gnu tar can!

What kind of ORIGINAL backup did you use, and how BIG is it?

live free or die
harry
Live Free or Die
Victor_5
Trusted Contributor

Re: copy of backup tape

Are you talking tape-to-tape copy or backup from disk to tape? For tar

tar cvf /dev/rmt/0m file_name

which /dev/rmt/0m is your default tape, you can change it if yours is a different one.

MANOJ SRIVASTAVA
Honored Contributor

Re: copy of backup tape

Hi Dottie

Here is what you ahve to do.

1. Cd to a directory which has sufficient space in it .

2. tar xvf /dev/rmt/0m ( this will copy the tape on the disk )

3. Insert the new catridge on which you want to copy the software .

4. tar cvf /dev/rmt/0m * and all the files in the pwd will get copied on the tape.


Manoj Srivastava
Sachin Patel
Honored Contributor

Re: copy of backup tape

Few weeks ago I had same question. We had 40 old fbackup tapes and we want to make copy of that DAT tape. I didn't found no utility or easy way to do tape copy.

I write small script which first reads tape put it on one directory and create graph file and then write back on same tape drive but this time on blanck tape then delete from hard-disk.

Here is that small script.
#!/bin/sh

cd /home/cmarshal/tapes

mt -t /dev/rmt/0m rew

/usr/sbin/frecover -f /dev/rmt/0m -xXov

echo "Enter Blank tape"
read ans

/usr/bin/mt -t /dev/rmt/0m rew

ls | grep -v tapecopy | sed 's/\s+/ /g' |sed 's/^/i /g' > graph.file

cat graph.file
echo "is this correct graph file"
read ans

/usr/sbin/fbackup -0vg /home/cmarshal/tapes/graph.file -f /dev/rmt/0m

for i in `ls | grep -v tapecopy | sed 's/\s+/ /g'`
do
echo $i
rm -r $i
done

exit 0
----------------

Sachin
Is photography a hobby or another way to spend $
Dottie Lopomo
Occasional Contributor

Re: copy of backup tape

This would be a tape to tape copy using fbackup, I have been unable to get the correct size yet.

thanks for the input so far
Helen French
Honored Contributor

Re: copy of backup tape

Hi Dottie:

As your backup is created with fbackup, you cannot use 'dd' command to duplicate the backup tape. You may have to consider other methods provided already.

Read this document too (TKB# KBRC00001049):

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=d47bdaf00e4ace5df6/screen=ckiDisplayDocument?docId=200000048086788

HTH,
Shiju

Life is a promise, fulfill it!
A. Clay Stephenson
Acclaimed Contributor

Re: copy of backup tape

In that case, you are going to have to use the frecover command to restore to disk and then do a tar (or a Gnu tar) if any of the files are > 2GB.
If it ain't broke, I can fix that.
Sachin Patel
Honored Contributor

Re: copy of backup tape

Hi Dottie,
Believe me I spend a full week trying to find out any other way to make tape copy.
Finally I had to do frecover and fbackup again.

Use the script from my previous answer. You just have to change directory path and device name.

Sachin
Is photography a hobby or another way to spend $