1832877 Members
2148 Online
110048 Solutions
New Discussion

tar

 
Betty Hardin
Frequent Advisor

tar

We are converting db's from unix to windows (yes; they are getting rid of the unix box).

At the end of the year, a db backup is created and copied to tape using tar.

I need to restore these backups so that I can convert them to windows.

Using tar -tvf /dev/rmt/2mn I get nothing. No errors - nothing. It just returns to the prompt.

Is there nothing on these tapes??
7 REPLIES 7
spex
Honored Contributor

Re: tar

Hi Betty,

The first thing to do is to confirm you are specifying the correct device with tar. 'ioscan -fnC tape' will list your tape drive(s). Alternatively, check the backup script used to create the archive to see which device is specified. If no device is specified, the default device (/dev/rmt/0m) was used.

Then, be sure to rewind the tape before attempting to list archive contents.

For example:
# mt -f /dev/rmt/0mn rew
# tar tvf /dev/rmt/0mn

PCS
Patrick Wallek
Honored Contributor

Re: tar

How long does the tar command run?

Are the files that were backed up larger than 2 GB? If so was tar patched to allow it to backup files up to 8GB?
Bill Hassell
Honored Contributor

Re: tar

The -tvf option will report on all the files in the archive. One of the problems with handling tapes is that an accident can happen after the tape is written, perhaps an mt command with the eof option or an aborted tar or cpio command after the original backup. This would result in tar finding the end of file or end of data mark and reporting nothing.

Do you know if the backup tapes were created by hand or from a script? If by script, take a look at the script to see how the backup was made and what actions were taken after the tar completed.

Do you know if any of the backups were ever verified? This is one of those inconvenient but crucial steps for a backup strategy.


Bill Hassell, sysadmin
Raj D.
Honored Contributor

Re: tar

Betty,

1.You can check the following :
After inserting the correct tape:
# mt -t /dev/rmt/2mn status
# mt -t /dev/rmt/2mn rew
(it will take sometime to rewind the tape if it is not in starting position
# mt -t /dev/rmt/2mb status ( check it is in BOT ready)
# tar -tvf /dev/rmt/2mn
( Does this command lists any files.)

2. Do you know which command used to take the backup , was it tar ? ,or cpio , or through anyother script. If it is not tar then you cantry to find out the script or something that used to take the backup.


hth,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
George Liu_4
Trusted Contributor

Re: tar

ioscan -C tape to check /dev/rmt/2mn is claimed .
Betty Hardin
Frequent Advisor

Re: tar

mt -t /dev/rmt/2mn status shows:
Drive: QUANTUM DLT8000
Format:
Status: [41118985] BOT online compression immediate-report-mode
File: 0
Block: 0
#
# mt -f /dev/rmt/2mb status
Drive: QUANTUM DLT8000
Format:
Status: [41118985] BOT online compression immediate-report-mode
File: 0
Block: 0
#
tar -tvf /dev/rmt/2mn shows:
Tar: blocksize = 16
directory checksum error

The drive was previously identified as /dev/rmt/1mn - it was replaced (due to failure) a couple of weeks ago. Could that be the source of my problem?
Samir Pujara_1
Frequent Advisor

Re: tar

Hi,

It seems that your media is getting currpted due to faulty tape drive as it is showing the check sum error.

But in some case (very rare) it may work fine with other drive.