- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Archivery Tricks
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
Discussions
Discussions
Discussions
Forums
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
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
тАО10-05-2001 02:39 AM
тАО10-05-2001 02:39 AM
Archivery Tricks
this is a silly little problem I have.
I want to transfer a directory tree between two hosts.
Now with the this tar command I have always been a happy camper:
# cd /opt/gnu
# tar cf - mysql | ssh other_host \(cd /opt \; tar xvf - \)
But this time I needed to omit a submount on /opt/gnu/mysql/var.
So I thought about using find together with cpio, and I tried this
# cd /opt/gnu
# find -depth -xdev mysql | cpio -o | ssh other_host \| cpio -imuxdav /opt
Somehow it say
51093 blocks
51093 blocks
but actually wrote nothing on other_host.
Where is it gone?
What's wrong with my cpio syntax?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 02:45 AM
тАО10-05-2001 02:45 AM
Re: Archivery Tricks
# find mysql -depth -xdev|cpio -o|ssh other_host cat - \|cpio -imuxdav /opt
but didn't solve it...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 02:59 AM
тАО10-05-2001 02:59 AM
Re: Archivery Tricks
Try inserting a dd around the ssh; dd bs=64k | ssh .. | dd bs=64k | cpio ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 03:30 AM
тАО10-05-2001 03:30 AM
Re: Archivery Tricks
Like Stefan implies, 'remote pipes' (i.e. pipes used with remsh(1), ssh, etc.) often have buffering problems, which can be fixed by dd(1) around the remote pipe, but it is still tricky to get things right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 04:08 AM
тАО10-05-2001 04:08 AM
Re: Archivery Tricks
if you are using Secure SHell (ssh), why not use Secure
CoPy (scp)? Or even "rsync" with "ssh" as transport?
Then you can avoid all that "tar" and "cpio"...
Just my ?0.02,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 04:13 AM
тАО10-05-2001 04:13 AM
Re: Archivery Tricks
the reason why I don't want to use rcp, scp, or anything which does recursive copying is simply that those will follow links instead of duplicating them as what they are.
The same I think goes for any other special files (e.g. devices, fifos, domain sockets etc.) which cannot be treated correctly by above commands.
I will come back later to assign points...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 05:22 AM
тАО10-05-2001 05:22 AM
Re: Archivery Tricks
Grab the gnu-tar, it allows you to tar from one machine to another (even remote devices), and it has an option to give it a list of files/directories to back up (the -T
http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.22/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 05:34 AM
тАО10-05-2001 05:34 AM
Re: Archivery Tricks
For the cpio case, use the B option to get a 5KB block size and let dd(1) read from cpio and write to cpio with a 5k block size, i.e. "cpio -oB .... | dd ibs=5k obs=..." and
"dd ibs=... obs=5k | cpio -iB ...". The reason for this is that 'remote pipes' do not quarantee which 'chunks' they will use, i.e. when you write 10 times 5k to a remote pipe, you will get 50k out of it, but not neccessarily in 10 blocks of 5k. The dd constructs solve that problem.