- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar and dd combination
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 08:08 AM
05-05-2003 08:08 AM
we use the below command for cutting the tape to ext-party
tar -cvfEb - 60 $1 | rsh remoteserver dd of=/dev/rmt/0 obs=800b
when we validate it looks good from unix and appln point....when the ext-party tries to restore the same he gets corrupted data...the command we used above from long back we modified to backup in remoteserver....any hints/tips highly appreciated
thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 08:20 AM
05-05-2003 08:20 AM
Re: tar and dd combination
Some versions of unix have byte ordering issues, known as big-endian/little-endian.
tar can not handle this situation, but "cpio" can. Do a "man cpio" for further info.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 08:20 AM
05-05-2003 08:20 AM
Re: tar and dd combination
remotesrvr # remsh localsrvr \( cd $1 \; tar cvf - . \) | dd | ddof=/dev/rmt/0m obs=800b
a5:/pro/3gl/HP 105 > remsh l1 \( cd /tmp/fin \; tar cvf - . \) | dd | dd of=/dev/null obs=800b
a ./dd 300 blocks
a ./fldlst 125 blocks
a ./btlst 6 blocks
a ./hshlst 24 blocks
a ./lnklst 23 blocks
a ./dd.sv 302 blocks
a ./fldlst.sv 126 blocks
a ./btlst.sv 6 blocks
a ./hshlst.sv 24 blocks
a ./lnklst.sv 23 blocks
a ./fldlst.df 2 blocks
a ./btlst.df 1 blocks
a ./hshlst.df 1 blocks
a ./lnklst.df 0 blocks
980+0 records in
980+0 records out
980+0 records in
1+1 records out
a5:/pro/3gl/HP 106 >
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 08:22 AM
05-05-2003 08:22 AM
Re: tar and dd combination
the manual pages on my box show no 'E' option.
And the 'b' option doesn't work. Read the following pragraph from tar manual pages:
b Use the next arg argument as the blocking factor for archive records. The default is 20; the maximum is at least 20. However, if the f - modifier is used to specify standard input, the default blocking factor is 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 01:41 AM
05-06-2003 01:41 AM
Re: tar and dd combination
The "b .. 60" specifies a blocking factor of 60 (blocks of 512 bytes each), so a record size of 60 blocks, but dd(1) reads with a (default) input block size of 1 block and writes with a output block size of 800 blocks.
Furthermore, as others mentioned, HP-UX' tar(1) does not have an "E" option, and HP-UX' Remote Shell is remsh, not rsh.
So which system(s) *are* we talking about?
See also procura's comment about buffering over the network:
A 'remote pipe', i.e. a normal pipe combined with r[em]sh(1), does not guarantee that what comes in on one end comes out on the other end in the *same* 'chunks'. I.e. if you send for example 10 'chunks' of 60 blocks, 600 blocks will come out, but *not* neccessarily in 10 'chunks' of 60 blocks.
This is normally solved by putting a pair of dd(1) commands 'around' the remote pipe and letting the dd(1) commands write to and read from the remote pipe with the same block size, i.e. for example (using your strange example):
tar -cvf[E]b - 60 $1 | dd ibs=60b obs=8k | r[em]sh remoteserver dd ibs=8k of=/dev/rmt/0 obs=800b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 10:34 AM
05-06-2003 10:34 AM
Re: tar and dd combination
the remoteserver here is hp and soure server is sun....hope these is clear.....and it used to run fine for long time.....
It is fine now since source server has veritas cluster crashed and we need to do fsck manually for the filesystems and take a backup...it is fine now
Thanks all for the suggestions/hints....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 10:43 AM
05-06-2003 10:43 AM
Re: tar and dd combination
E Write a tarfile with extended headers. (Used with c,
r, or u options; ignored with t or x options.) When a
tarfile is written with extended headers, the modification time is Maintained with a granularity of
microseconds rather than seconds. In addition,
filenames no longer than PATH_MAX characters that
could not be archived without E, and file sizes
greater than 8GB, are supported. The E flag is
required whenever the larger files and/or files with
longer names, or whose UID/GID exceed 2097151, are to
be archived, or if time granularity of microseconds is
desired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 11:08 AM
05-06-2003 11:08 AM
SolutionWhen you use non-standard arguments, especially across platforms, you are asking for problems.