rsync icon indicating copy to clipboard operation
rsync copied to clipboard

rsync --delete --backup --suffix fails to (re)move directories

Open djasnd opened this issue 3 years ago • 0 comments

Performing a command like

rsync -a  --delete --backup --suffix=xxx  source dest

when some directory within source has recently been deleted, results in the error

cannot delete non-empty directory: some/dir

which is true, given that the directory contains the renamed (suffixed) backup files. However rsync should not be trying to delete the destination dir, but instead renaming it using the suffix (dirxxx).

Likewise, directories that were replaced by symlinks in the source cause the error

could not make way for new symlink: some/dir

If this behavior is viewed as performing according to spec, then please regard this bug report as a feature request!

djasnd avatar Dec 17 '20 02:12 djasnd