1829108 Members
2582 Online
109986 Solutions
New Discussion

Backup Restore

 
Himanshu_3
Valued Contributor

Backup Restore

Hi All,

Is it possible that restore of backup taken on HP -UX system thorugh tar are not successfull and on the same tape drive and same tape, if backup is taken through fbackup restore doesnt't have any problems. The error we get on the tar backup is as

# tar tvf /dev/rmt/26mn
Tar: blocksize = 16
Backup on the tape were successfull but while listing and restoring it had problems. The backup taken with tar had been given without any options, as default.We tried all options
for different blocksizes as below

tar tvfb 64 /dev/rmt/26mn
tar tvfb 20 /dev/rmt/26mn
tar tvfb 16 /dev/rmt/26mn

Why is it so that backups taken with fbackup are restored with success while listing and restoring from tar has problems.

Thanx
Himanshu


6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Backup Restore

Was the tar backup taken with the HP-UX version of tar or the Gnu Tar?

It sounds like either the tape was overwritten with something else, or the tape somehow got scrambled.
Steven E. Protter
Exalted Contributor

Re: Backup Restore

If fbackup works and tar does not:

tar version may be bad. As noted above, the tape may have been hammered, or the heads could have been dirty when the tar was written.

A fair test is to take a fresh tape, make a tar to tape (the default) and then try and restore the file.

Then do the same thing with a fresh tape with fbackup.

If both tests work, you have no problem and the prior answer is correct, bad luck. If the tar test fails, make sure tar is patched and see what verion of tar you are actually using.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Backup Restore

HP-UX tar cannot read tapes with any blocksize other than the default or by specifying the correct blocksize. Use pax instead to restore your data. pax can read any blocksize for tar or cpio and restore your data. The tar tapes may have been created over a network which means that someone messed with the blocksize.


Bill Hassell, sysadmin
Himanshu_3
Valued Contributor

Re: Backup Restore

Hi Patrick,

The command used was
tar cvf /dev/rmt/0mn /DDL1/archive.

We have ultimately got the drives replaced and all seems to be well. Can a drive make such a defference that it is able to do fbackup and not tar ?


Cheers,
Himanshu
john korterman
Honored Contributor

Re: Backup Restore

Hi,
the success of fbackup may be caused by the fact that it was written to the RE-winding tape device.
You tar command uses the NON-rewinding device, /dev/rmt/0mn , causing data to be written to the tape, starting at the current tape position (whatever that might be).
Rewind your tape - before and writing a tar backup to a non-rewinding device, e.g.:
# mt -t /dev/rmt/0mn rew
in order to establish a valid starting point, or use the non-rewinding device.

regards,
John K.
it would be nice if you always got a second chance
Himanshu_3
Valued Contributor

Re: Backup Restore

John,

Rewind of the tape had been performed before taking the tar backup.

Thanx
Himanshu