What happens after --max-delete is reached? Are updates processed?

Sebastian Arcus shop at open-t.co.uk
Mon Nov 12 06:51:11 MST 2012


On 31/10/12 11:38, Voelker, Bernhard wrote:
> Sebastian Arcus wrote (Wednesday, October 31, 2012 12:18 PM):
>
>> Reading the manual page: "This tells rsync not to delete more than NUM
>> files or directories." Also, according to docs, rsync exits with code 25
>> if max-delete has been reached. Now, rsync starts with the deletes by
>> default, and then it does updates.
>>
>> My question is, if --max-delete has been reached, does rsync still
>> proceed with the updates (not the deletes), or just exists immediately
>> with code 25 without doing any updates? The man page doesn't specify
>> either way, and looking at online posts, it would seem to suggest it
>> exits as soon as max-delete has been reached.
>
>  From trying, I'd say it continues with updating
> (for whatever case that would make sense ...):

Sorry to get back to this, but I have spent more time reading the latest 
version of the manual, and I've stumbled over this:

"The --delete option may be combined with one of the --delete-WHEN 
options without conflict, as well as --delete-excluded. However, if none 
of the --delete-WHEN options are specified, rsync will choose the 
--delete-during algorithm when talking to rsync 3.0.0 or newer, ..."


And --delete-during has this to say for itself:

"Request that the file-deletions on the receiving side be done 
incrementally *as the transfer happens*. "


While --max-delete has this:

"This tells rsync not to delete more than NUM files or directories. If 
that limit is exceeded, a warning is output and rsync exits with an 
error code of 25 (new for 3.0.0)."


Now, if I read all of the above correctly, it would imply that rsync 
gives up on the transfer as soon as it reaches the --max-delete limit 
and does not finish the updates either (in default mode, when 
--delete-during is implied).

Can anybody confirm if this is correct please, or I'm interpreting the 
man page the wrong way around? I need to know what is actually happening 
with my backups, and if they are being finished correctly - even when 
--max-delete is being reached.

Sebastian


More information about the rsync mailing list