sorting by file size

Sebastien Roy roys at iro.umontreal.ca
Mon Dec 15 17:55:31 GMT 2008


Hello everyone,

I have been using rsync for many years to incrementally update a mirror
of my laptop. Because I work with video a lot, I mirror a mixture of
huge files (up to 3 gig per file) with tiny file (code).

Since I sometime don't have time to complete the mirroring in a single
shot. Any small file getting mirrored after the larger will not be
mirrored at all until I find enough time for rsyn to finish. This is a
problem.

Could it be possible to add an option "--sort-by-size" that would do the
smallest files first? This way, if rsync is interrupted you get the
maximum ammount of files upated, especially the small ones.

The size could be the absolute file size (then it would fit with
--min-size and --max-size) or the ammount of bytes that must be
transfered (a large file with few changes is considered small).

Currently, I use rsync twice:
rsync --max-size 10m ...
rsync --min-size 10m ...
So i mirror small files first. But this requires scanning twice the file
hierarchy.

Sincerely,

Sebastien




More information about the rsync mailing list