rsync cannot delete non-empty directory

I had a rsync backup script that suddenly came with the error message:
cannot delete non-empty directory

This reason why this error occurs is that a dir is deleted or renamed on the source AND you are using the option --exclude.

The solution is to add the option --delete-excluded.

As the manuals says:
--delete-excluded also delete excluded files from dest dirs

Post new comment
The content of this field is kept private and will not be shown publicly.
CAPTCHA
Deze vraag is om te controleren of u een persoon bent. Di is om spam berichten tegen te gaan.