Linux – Rsync to a backup server resulted in additional space taken

backuplinuxrsyncunix

I ran an rsync to backup one of our production servers. I put the production server in readonly mode so that no additional data could be added or modified. I then did a recursive rsync with archive (-a) to backup the production servers data directory to a remote backup, which is configured identical to the production server.

After days passed, what I found was that the backup (destination) server ended up having about 100MB more of data. How could this be — Is that normal? Any idea how to track this down? Right now I'm doing a ls -laR out to a file on both the production and backup server. I'll then try to diff the files to see if there is any differences. Any other tips?

Best Answer

I would not be overly concerned. Afterall, there might be sparsely allocated files. When these are copied via logical file access that rsync uses, the unallocated space is expanded read as a zero filled area and thus you get more space. The file sizes would still be the same on both the source and destination.

BTW, instead of a diff I might do compare file checksums via md5sum or sha1sum.

Related Topic