1

We are copying our data from source server to destination server using rsync : rsync -av --progress --sparse user@destination server

After rsync, we observed that destination directory is bigger in size than source directory. I checked both directory's storage using "du- sh".

I am assuming these could be sparse files. If yes, is there any impact of having sparse files(other than the extra size they consume)? Is there a way to suppress these sparse files? Any other way to confirm both the source and destination directories are of same size with same data (minus sparse, if at all it is)?

  • Is it possible that symbolic links are being followed and copied rather than simply replicating the links? – DopeGhoti Feb 4 '16 at 20:30
  • Possible; Any way of confirming this? It could be hard links or any symlinks? – Himanshu Feb 4 '16 at 20:41
  • have you deleted files from the source? I don't see the --delete flag that would remove them from the target. – Jeff Schaller Feb 4 '16 at 20:50
  • Hi Jeff, Adding --delete would not help, as it would only delete the data from destination which has been deleted at source's end. We tried above rsync command in an environment, where there are no changes on real time to Source server's data(source application server shutdown). Both before and after completion of rsync copy, the source server always had same data when checked using "du -sh" – Himanshu Feb 4 '16 at 21:29
1

Do both use the same filesystem? Different filesystems may have different blocksizes so the filesize may be different.

  • Yes, both of the source and destination use same filesystems and same block sizes. The additional space could be possibly due to sparse files. Any way of handling sparse files or deleting them later? Do they actually impact application in any way? – Himanshu Feb 4 '16 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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