Why is my rsync backup size different than my Linode's?
I made a local backup using the rsync -ahvz
command. My Linode is 10gb, but my rsync backup size is 99.7. Why are the sizes different? Did my backup work?
1 Reply
Fortunately, if you're seeing that output from rsync, it was able to complete your backup :) There are several possibilities as to why you're seeing a size difference, borrowed from the rsync FAQ page.
A difference in output format
My initial thought was that rsync was providing its data in a different format than gigabytes. It looks like you would have to use the -h or --human-readable flag twice in order to compare the two sizes better, since rsync uses decimal units in powers of 1000 by default. Ideally this accounts for the entire difference, but it could also be hiding another issue by concealing how big the difference between your Linode and your backup really is.
Hard links and sparse images
Rsync does not maintain hard links by default, so that could be causing a difference in sizes. It also does not write sparse images by default; sparse images would include virtual machine images and may be contributing to the disparity you're seeing.
Difference in directory sizes, filesystem types, etc.
You can check to see if the files themselves are the same size by using echo `find . -type f -ls | awk '{print $7 "+"}'`0 | bc
. The directories may not be the same size, and there may also be differences in filesystem types and other small variations that have an impact on backup size.
Exclusion of files and file verification
Files may have been excluded entirely from the backup process due to configuration or default settings. You might want to use a file verification tool in order to validate your backup manually.
You may also want to check out this rsync webpage for more ideas.