?
Solved

ufsdump corrupts tar on no rewind device!

Posted on 1998-06-22
4
Medium Priority
?
608 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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…
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 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.:
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…
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

800 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