Operating System - HP-UX
1826333 Members
3584 Online
109692 Solutions
New Discussion

remote tar backup - I/O error

 
SOLVED
Go to solution
Fredric Persson
Advisor

remote tar backup - I/O error

What is the best way to backup remotely using the tar command (we have Omniback and Legato)?

I have tried this:

On source system (Sun Solaris 7)
tar cvfBh - | ssh root@ dd of=/dev/rmt/2m

F.Y.I.
tar options, B - Block, force tar to perform multiple reads(if necessary) to read exactly enough bytes to fill a block.

tar options, h - Follow symbolic links

ssh - secure shell (not necassary, but we have a high security standard)

Remote server is a HP, K570 with a Quantum 7000 DLT (4 drives).

I have mounted the tape with the mc command and it is about 20GB data.

It worked fine, but after about 2h I got I/O error.

Am I doing the right thing?

Thanks!

//Fredric
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: remote tar backup - I/O error

You could try GNU's tar, if you want a tar tape, and it handles large files, but you will need GNU's tar to retract if you move the tape to another system:

http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.22/


live free or die
harry
Live Free or Die
Sanjay_6
Honored Contributor

Re: remote tar backup - I/O error

Frank Slootweg
Honored Contributor
Solution

Re: remote tar backup - I/O error

I do not know what block size Sun Solaris 7 tar uses, so I will assume the default 10KB.

The general problem is that a 'remote pipe' does not guarantee a certain blocksize out of the pipe. I.e. if you write 5 records of 10KB, you will get 50KB out of the remote pipe, but not neccessarily in 5 records of 10KB.

To solve this problem, use dd(1) commands around the remote pipe (You used one dd(1) command, but you should use two and you should specify the right block size). I have left off the Solaris option B and assume 10KB (20 blocks) records:

tar cvfh - | dd bs=10k | ssh root@ dd bs=10k of=/dev/rmt/2m

To check the block size which Solaris' tar uses, you can use:

tar cvfh - | dd bs=64k of=/tmp/record count=1 ; ll /tmp/record

If it is other than 10KB, then use tar options until it is 10KB. Don't use anything smaller, because it gives a bad performance on a DLT. If you use something bigger, then note it down, because it is non-standard.

Out of interest, why are you using tar when you have OmniBack and Legato?



Fredric Persson
Advisor

Re: remote tar backup - I/O error

I??m going to send the DLT tape to another site, where they don??t have Legato/Omniback (Netbackup).