Solved

ufsdump corrupts tar on no rewind device!

Posted on 1998-06-22
4
594 Views
Last Modified: 2013-12-27
I currently use DDS 2 DAT 4mm tape to backup the following data types to a no-rewind
device on Solaris 2.5:

File#0 =  Informix ontape level 0 backup
File#1 =  tar  cvf /dev/rmt/0n $AppDir
File#2 - #8 = ufsdump 0ucf /dev/rmt/0n   /   /usr   /opt   /var   /home1   /home2

Before I add the tar (file#2), I run the following commands:

mt -f /dev/rmt/0n asf 1

Before I add the ufsdumps, I run the following commands:

mt -f /dev/rmt/0n asf 3

then I use the no-rewind device for each ufsdump.

There are 8 files on the tape after the last ufsdump; i.e. the result of :
 
mt -f /dev/rmt/0n status

The problem I have is that on several occasions the tar (File#2) gets corrupted or
damaged after adding the ufsdumps.  When I fast forward the tape to file#2 and
run tar tvf /dev/rmt/0n, I get no output or on other occasions I get block size = 2.

I would like to continue using one 4mm tape to put all the backups since each 4mm
DDS2 tape can hold 4GB; but until I can resolve this problem I have to use two 4mm
tapes to seperate the ufsdump.

I would appreciate any advice or solution you can give me.
I would prefer to use tar instead of cpio because cpio does not restore files to their
original locations.

Thanks in advance for your help!

Denmark w.
0
Comment
Question by:dweatherb
  • 2
4 Comments
 
LVL 3

Expert Comment

by:rickyr
ID: 2008118
Hi...
I have never heardof tar'ing and dumping to the same tape.
SUNmicrosytems recommend ufsdump rather than tar.
Have you tried tar'ing to a file first, then incorporating the tar'ed file along with a dump.

File#1 =  tar  cvf home1/backup.tar

regards
0
 
LVL 3

Expert Comment

by:rickyr
ID: 2008119
woops
File#1 =  tar  cvf home1/backup.tar $AppDir
forgot to add your source dir.
0
 
LVL 5

Expert Comment

by:ecw
ID: 2008120
Why bother with mt between writes.  The tape will be positioned after the last filemark written when each of the commands returns.
0
 
LVL 1

Accepted Solution

by:
burnotte earned 200 total points
ID: 2008121
if you use no rewind device you shouldn't use the mt command between the backup command because if you use the no-rewind tape command  will no rewind the tape except if eject the tape.
but if you really want to use the mt command it shouldn't cause any problems but the second mt command should be :
mt -f /dev/rmt/0n asf 2 or
mt -f /dev/rmt/0n rewind
+
mt -f /dev/rmt/0n fsf 2
but not asf 3 like you write !

----
You can also use cpio but you will have to use absolute path
for doing your back it will look like :
find /x -depth -print |cpio ...
this way the /x directory will be restore in it is original place.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

746 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

11 Experts available now in Live!

Get 1:1 Help Now