Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with transfer files between two Linux servers in the same network. On source server I have directory with 40055 small files, directory size is 34 GB. I tried to transfer those files with rsync command:

rsync -ah --progress --inplace /dir/dir_with_files user@server:/dir/destination_dir

After transfer, on destination server I have directory with size 108 GB not 34 GB

Blocks on partitions are the same.

I did the same thing with scp but the problem is the same.

share|improve this question
Any sparse files ? – Iain Feb 15 '14 at 11:47
omg, I forgot that it may be sparse file. Thanks – user209482 Feb 15 '14 at 12:07
up vote 2 down vote accepted

For a complete retention of everything, try:

rsync --archive --hard-links --sparse-files --acls --xattrs source dest

Then to verify correctness, you can do something like (assuming no spaces in your file names): for file in *; do md5sum $file >> /tmp/sums.txt; done and then diff sums.txt on both servers. The md5summing is going to take a while, though.

If you do have spaces in your file names, construct something with find and/or xargs

BTW, what does du --bytes -hs say? That way, you rule out block size.

share|improve this answer

Your Answer


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.