rsync change file size at destination
Hello,
i'm using rsync as backup solution,but at destination i see different size but number of file are the same . by using rsync -a --update --delete source destination i saw folder size has increased but by using rsync -az --update --delete source destination i saw folder size at destination decreased i use du -sh for folder size .... any suggestion best regards.. |
Rsync's -z option compresses the data during the transfer from source to destination, it does not influence the file size of the original and the backup.
The size of the directories itself might increase over time, this is a feature (or bug if you want) of the ext2/3/4 filesystem. If you remove files from a directory than the info stays present in the directories meta-data and as a result the directory itself seems to grow over time. The size increase is always a multitude of the block-size used on the system (4096 on most modern systems). Also: The du command shows the file and/or directory size on a disk level (the amount of blocks it takes to store the info). This is not the same as the "actual" file size (amount of bits/bytes): Code:
$ echo 1 > foo |
Thanks druuna
I know about the difference of ls and du ... so i always use du for checking disk usage of a folder or fdisk -l .. for info i have 2 mail server one with 20G mbox and the other more than 70G .. after rsync i check disk usage ...different size i saw ..both source and destination have the file system ,block , cylinder and ... i can not explain this behavior for customers .. rsync -a --update --delete /mbox/ mail2:/mbox Best Regards |
Quote:
Quote:
Can you give an idea what the difference(s) are? Is the source side bigger or the destination side? How much of a difference is there? Quote:
Quote:
In general I would suggest that you: - add the -v / --verbose flag to the rsync command(s) you use. Maybe the detailed info shows something interesting, - recheck the content on both source and destination. Don't just run du, check if all the files are accounted for, - make sure that the destination side isn't contaminated with other files and/or directories which where not part of the rsync process. |
All times are GMT -5. The time now is 12:27 PM. |