rsync backup - order by size

Matt McCutchen hashproduct+rsync at gmail.com
Thu Mar 29 02:18:20 GMT 2007


On 3/28/07, Ty Miller <tyronmiller at gmail.com> wrote:
> If I changed this to include the --min-size and --max-size so that there are
> the following two rsync passes;
>
> - Empty the daily incremental backup dir
> - Backup small files to the "Current" dir, moving modified or deleted files
> to the daily incremental dir
> - Backup large files to the "Current" dir, moving modified or deleted files
> to the daily incremental dir
>
> How will this affect the reality of what happens? For example;
>
> - Will the first pass cause the Current dir to only contain small files,
> causing it to move the large files to the daily incremental dir? [...]

It's good that you bring this up, but I don't think it will be a
problem.  The --min-size and --max-size options tell rsync to skip
transferring regular files whose sizes are out of range, but those
files are still present in the file list.  Thus, the receiver will
know not to delete any of the files from the "Current" dir that exist
on the sender, even files that belong to the other pass.  The two
passes should give you the same result as the one pass currently does.

Matt


More information about the rsync mailing list