tar: directory checksum error

  • vish64
  • Novice
  • Novice
  • vish64
  • Posts: 23
  • Loc: USA

Post 3+ Months Ago

Hi ,

I am on a Sun Solaris Machine with UNix installed.
I am tryin to restore a file backed up on a external Tape drive. We used a perl script to run the backups which uses the tar command for the backups.

I run

tar xvbf 1024 /dev/rmt/0n <path of file to be restored>


I keep getting the " tar: directory checksum error " . Does anybody what I would be doing wrong ?

Thanks,
v
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

If you are using Sun Solaris, you most certainly ARE using Unix.

It could be two different versions of tar, (native and/or GNU). Check which one you are running, and try using GNU tar to extract, or vice versa.

'man tar' should help you out here.

Cheers.
  • vish64
  • Novice
  • Novice
  • vish64
  • Posts: 23
  • Loc: USA

Post 3+ Months Ago

Hi,

Well the backup and restore are being done on the same machine (server). So it would be the same version of tar, right ?

this is the command in the perl script that we are using to create the tar file

$fullBackup="/usr/local/bin/tar cvf - ";

If not, how would I use the GNU tar to extract ? Is it a different command ? I didnt see anything in the man files.

Thanks,
V
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

OK, well that might just be it. Typically, GNU tar is at /usr/local/bin/tar, instead of native tar, which is /usr/bin/tar.

Try that one instead.
  • vish64
  • Novice
  • Novice
  • vish64
  • Posts: 23
  • Loc: USA

Post 3+ Months Ago

hi,

that seems to be the right way to do it, the GNU tar version in the local directory

But i still end up getting these errors -- after typing in the following command

# /usr/local/bin/tar xvbf 1024 /dev/rmt/0n rawdata/medicaid/alleg/claims/alda99.ssd01


/usr/local/bin/tar: /dev/rmt/0n: Cannot read: I/O error
/usr/local/bin/tar: At beginning of tape, quitting now
/usr/local/bin/tar: Error is not recoverable: exiting now


Does this mean I do not have the correct drive listing ? Where would I see that if thats the case ?

Thanks,
V
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

OK, you're getting an IO error when you try and read the tape. Have you tried mounting it?

You can check the contents of the tar via a tar -t (found in 'man tar').

Try this;
mt -f /dev/rmt/0n rewind

You sure it's 0n? (Device)?

and you were using that perl to create the tar? Just out of curiosity, why are you not using ufsdump and ufsrestore? Regardless, are you creating the tar with the 1024*512 byte block size? Is your extract doing the same?

First make sure your tape can even be mounted. :)

You may not have been recording the whole time. I have seen that happen. (Back when I did SysAd work, I always made sure my incrementals and fulls restored at least once per month... just to make sure. ).
  • vish64
  • Novice
  • Novice
  • vish64
  • Posts: 23
  • Loc: USA

Post 3+ Months Ago

Hey,

Mounting the tape worked ! Thanks a lot,

never thght that wld be an issue since i run the backups w/o any mounting usually. The script doesnt use mt anywhere as well.

Also, an issue if you've ever come across this.... when one is the su mode, does the tar 's z option become unusable ? I kept getting an unrecognised option for z (gzip) when i was using tar as su on a remote machine. But as root, the system recognised it ... same machine.

just wondering if you've ever seen this ...

anywayz I can restore the tapes now ! thanks again

V
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

vish64 wrote:
Hey,

Mounting the tape worked ! Thanks a lot,

never thght that wld be an issue since i run the backups w/o any mounting usually. The script doesnt use mt anywhere as well.

Also, an issue if you've ever come across this.... when one is the su mode, does the tar 's z option become unusable ? I kept getting an unrecognised option for z (gzip) when i was using tar as su on a remote machine. But as root, the system recognised it ... same machine.

just wondering if you've ever seen this ...

anywayz I can restore the tapes now ! thanks again

V


No problem... Solaris has some oddities with raw devices vs. mounted; weird rules involving reading and writing.

As for your second question.... Recall that we spoke of two tar's? System tar and GNU tar? How much you want to bet when you su to root, you are using a different version of tar? Perhaps the base tar which is in the root user's path? Try being implicit with your tar execution; /usr/local/bin/tar etc etc, as the root user.

Cheers.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 51 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.