- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Tar files and directories to another server
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
11-16-2006 02:08 AM
11-16-2006 02:08 AM
tar cf - * | ssh server "cd /copy to dir ; tar xvf -"
The problem is that it is very very slow. Usually it is pretty quick, but now it is slow. The network is fine as we can use the cp -Rp command and it is substantially less time. The only thing that I can think of is that the directory structure is very very deep (up to 17 deep which is why we are moving everything). Could that cause the slowness? Why wouldn't it be slow then with cp? Any other ideas or switches to make it faster?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:15 AM
11-16-2006 02:15 AM
Re: Tar files and directories to another server
Use for example:
scp -rp * remotehost:/copy_to_dir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:16 AM
11-16-2006 02:16 AM
Re: Tar files and directories to another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:16 AM
11-16-2006 02:16 AM
Re: Tar files and directories to another server
which the volume of data that you this trying to copy? exist many small archives? this degrades the performance. it tries to use a NFS I believe that he is more fast.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:24 AM
11-16-2006 02:24 AM
Re: Tar files and directories to another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:26 AM
11-16-2006 02:26 AM
Solutioncd /old_filesystem
find . â xdev â depth â print|cpio â pmd /new_filesystem
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:28 AM
11-16-2006 02:28 AM
Re: Tar files and directories to another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:28 AM
11-16-2006 02:28 AM
Re: Tar files and directories to another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:30 AM
11-16-2006 02:30 AM
Re: Tar files and directories to another server
find . -xdev -depth -print|cpio -pmd /new_filesystem
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:39 AM
11-16-2006 02:39 AM
Re: Tar files and directories to another server
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:41 AM
11-16-2006 02:41 AM
Re: Tar files and directories to another server
- on source machine
>cd /sourcedir
>tar cvf - . | ssh destmachine "cd /destdir ; tar xvf -"
B) from dest machine - getting data from the source machine
- on destination machine
>cd /destdir
>ssh sourcemachine "cd /sourcedir; tar cvf - . " | tar xvf -
FWIW - I prefer using tar to move things also, it preserves file ownership, symbolic links, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 02:42 AM
11-16-2006 02:42 AM
Re: Tar files and directories to another server
# find /source -type d | cpio -ov | remsh server " cd /copy ; cpio -idvum "
What switches can I use to copy the directories and data and subdirectories?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2006 03:06 AM
11-16-2006 03:06 AM
Re: Tar files and directories to another server
Re: directories and subdirectories - that's what the "d" in the extract command is for, and you already have it. You may have to add that option to the first "cpio" as well as the extraction part to make it fly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2006 01:34 AM
11-18-2006 01:34 AM
Re: Tar files and directories to another server
Your command may be improved inserting gzip at the source server and gunzip at the target.
The v option of tar on the target can also increase the execution time.
I suggest you to try this :
tar cf - * | gzip -c | ssh server "cd /copy_to_dir ; gunzip -c | tar xf -"
Regards,
JPH