I'm performing an rsync
of files into an encrypted volume, which has a maximum size. Before performing the synchronization process I would like to determine if there is enough space left in the volume.
I have already played around with the --dry-run
option of rsync but it does not give me amount ADDITIONAL bytes that have to be transfered, e.g.
File_A -> 30KB
rsync for first time
change File_A -> 73KB
Now I would like to receive the amount of additional space I need, which in this case would be 43KB. That should be done for all files and sub-folders so that I can determine if the space left on the volume is sufficient.
By using the --dry-run
option like this:
rsync -an --stats test.txt folder/
Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 10 bytes
Total transferred file size: 10 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 68
Total bytes received: 19
sent 68 bytes received 19 bytes 174.00 bytes/sec
total size is 10 speedup is 0.11 (DRY RUN)
The file folder/test.txt
is of size 6Bytes, and the test.txt
is of size 10Bytes, therefore the difference is 4Bytes. But I only receive the total size of the file that has to be changed in the Total file size: 10bytes
.
Is there any way (or even other tool) where I can determine the additional sizes?