copy-links with remove-source-files doesn't remove the source links
Andrew Hewus Fresh
andrew+rsync at afresh1.com
Tue Jan 7 01:30:33 UTC 2020
I noticed this issue and found a Debian bug report about it, but didn't
find any discussion from the actual rsync maintainers or in bugzilla, so
I thought I would post here and let you know it doesn't do what I expect.
Here are the steps for a small proof-of-concept, although I get the same
results over ssh.
$ rsync 2>&1 | head -1
rsync version 3.1.3 protocol version 31
$ mkdir src dst
$ echo content > file
$ ln -s ../file src/link
$ rsync -a --copy-links --remove-source-files src/ dst/
ERROR: Skipping sender remove for changed file: link
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]
$ ls -l src/link dst/link
lrwxr-xr-x 1 afresh1 afresh1 7 Jan 6 16:23 src/link -> ../file
-rw-r--r-- 1 afresh1 afresh1 8 Jan 6 16:23 dst/link
$ cat dst/link
I was expecting, and hoping, that it would remove the src/link symlink,
but as described in the above bug report, that doesn't happen.
Thanks for your time.
andrew - http://afresh1.com
A printer consists of three main parts:
the case, the jammed paper tray and the blinking red light.
More information about the rsync