Hi all! There is a need to copy sparse files (precisely VMware disk images) with rsync. For that purpose I'm using the -S (--sparse) option and they are copied just fine (the check sums of the original and file at destination are the same). However, as it is said in the manual: [quote] -S, --sparse Try to handle sparse files efficiently so they take up less space on the destination. [/quote] files really are processed efficiently and take up less space on the destination. The question is whether it is possible to copy sparse files as sparse, but to preserve the original file size? By file size I mean the size, that a file actually occupies on file system as reported by "du --block-size=1 FILE". The apparent size is always the same. Trying to find any relevant information on the web, including these mailing lists, didn't end up with anything. May be I was searching little wrong, but it doesn't seem anybody had such a question before. Any help will be highly appreciated. Thanks a lot!
> The question is whether it is possible to copy sparse files as sparse, but > to preserve the original file size? By file size I mean the size, that a > file actually occupies on file system as reported by "du --block-size=1 > FILE". The apparent size is always the same.If supported by your platform, also try: ls -l -s This may be related to the scanning block size rsync uses to determine if sparseness exists, or to write such a file. Maybe, I'm not quite sure of my thinking on this, I'm usually wrong. However, I do know there is a 'bug' filed regarding a large performance lag when copying sparse files with rsync. Just search bugzilla for 'sparse'. Since you're copying big files, it's something to be aware of until further characterized or fixed.