Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to tar up a directory that has about 3M tiny files in it. Tar is chugging along, but I'm thinking its going to take longer than I can wait.

I'm wondering if telling tar to not store metadata (owner, group, perms) would reduce the churn on reading and re-reading this huge directory and maybe speed things up, and if there is a tar switch that does this.

My initial perusal of the man page only gets me something like --no-xattrs, which looks like a start, but I was hoping someone had some specific knowledge.

share|improve this question
add comment

2 Answers

I've got to think that the performance of the underlying filesystem probably has a lot to do with what you're getting out of tar.

What is the filesystem you're reading from, and how tiny are the files?

share|improve this answer
add comment

You might try adding mbuffer between your tar and your output file. I just learned about it, and it did wonders for my transfer.

e.g. tar -c dir | mbuffer > output.tar

Might not help if the slowness really is a a result of disk or filesystem limitations.

share|improve this answer
    
How do you envision this being faster than tar -cf output.tar dir ? –  sciurus Oct 14 '11 at 2:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.