- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Tar taking 2 hrs for filesystem with deep director...
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
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
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
08-21-2015 06:13 AM
08-21-2015 06:13 AM
Hi ,
We have a VM in which we want do local copy of 6.7GB .
Taking more than 2 hrs to copy .
What is the fastest way to copy data from one filesystem to another ?
Have tried throught tar -cvf its taking almost 1.5 hrs.
Solved! Go to Solution.
- Tags:
- tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2015 05:57 PM
08-21-2015 05:57 PM
Re: Tar taking 2 hrs for filesystem with deep directory structure
> [...] with deep directory structure
Define "deep".
> Taking more than 2 hrs to copy .
When you "copy" _how_, exactly?
As usual, showing actual commands with their actual output can be
more helpful than vague descriptions or interpretations.
> Have tried throught tar -cvf its taking almost 1.5 hrs.
I assume that that's only half (or less) of your actual command. I
normally use a "tar" pipeline for such jobs. I don't know if it affects
the speed much, but I would not use "v" (on either side of the "tar"
pipeline), _especially_ for a large job. If there's some kind of error,
I'd like to see the message, not have it get lost in voluminous "tar v"
output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 09:56 PM
08-23-2015 09:56 PM
Re: Tar taking 2 hrs for filesystem with deep directory structure
Hi Steven ,
We need /backup of 6.7GB to be copied to /temp_backup on same VM ( Redhat linux 6.1 )
cd /backup
tar -cvf /temp_backup/backup.tar *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 10:07 PM - edited 08-23-2015 10:09 PM
08-23-2015 10:07 PM - edited 08-23-2015 10:09 PM
Re: tar taking 2 hrs for filesystem with deep directory structure
>tar -cvf /temp_backup/backup.tar *
By using a tar pipeline, you don't have to write to the 6.7 GB tarfile and then read back from it. You just send that data through the pipe.
Assuming you are later doing a "tar -xf"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 10:35 PM
08-23-2015 10:35 PM
Re: tar taking 2 hrs for filesystem with deep directory structure
Hi Dennis ,
Tar pipeline ? Can you please share the same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2015 10:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2015 10:31 AM
08-24-2015 10:31 AM
Re: tar taking 2 hrs for filesystem with deep directory structure
> We need /backup of 6.7GB to be copied to /temp_backup on same VM
> [...]
Do you want a giant "tar" file at the destination, or do you want a
file tree like the source file tree?
> cd /backup
> tar -cvf /temp_backup/backup.tar *
That will give you the giant "tar" file. Again, I'd omit "v". Also,
"*" will not catch "hidden" files (".login", and so on). If I wanted a
giant "tar" file, I'd do:
( cd /backup ; tar cf /temp_backup/backup.tar . )
If the bottleneck in your scheme is the disk-writing speed, and your
CPU is speedy. then you might save some time by compressing the data.
For example:
( cd /backup ; tar cf - . | gzip -c > /temp_backup/backup.tgz )
On a modern GNU/Linx system, GNU "tar" probably has built-in
compression options, but using an explicit compression program in the
pipeline (as shown above) works on systems with older and/or less
capable "tar" programs.
http://www.gnu.org/software/tar/manual/html_node/gzip.html#SEC134
> Tar pipeline ? Can you please share the same
Your Forum/Web search found nothing useful? One example (of many):
http://h30499.www3.hp.com/t5/x/x/m-p/3966579
Substituting "&&" for ";" in those example pipelines can improve
behavior when errors occur.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2015 12:01 PM
09-08-2015 12:01 PM
Re: tar taking 2 hrs for filesystem with deep directory structure
Since you're on the same machine - cpio might be your friend.
Run this as root:
cd <sourcedirectory>
find . | cpio -pdmvu <destdirectory>
ex: sourcedirectory = /src, destdirectory = /dest
$> cd /src
$> find . | cpio -pdmvu /dest
-- This might run faster than tar - I would suspect that it would.
- Tags:
- cpio