Solved

ufsdump corrupts tar on no rewind device!

Posted on 1998-06-22
4
602 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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.:
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.

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