Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link-dest and remove-source-files don't play nicely together #649

Open
akostadinov opened this issue Oct 12, 2024 · 0 comments
Open

link-dest and remove-source-files don't play nicely together #649

akostadinov opened this issue Oct 12, 2024 · 0 comments

Comments

@akostadinov
Copy link

There is this use case to move files with rsync instead of performing a full copy

$ mkdir s
$ touch s/f1 s/f2
$ rsync -r --remove-source-files --link-dest="$PWD/s/" s/ d/
ERROR: Skipping sender remove of destination file: f1
ERROR: Skipping sender remove of destination file: f2
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.3.0]

But this fails as shown above. Can detection be fixed because obviously the source and destination are not the same path but hard links. And removing source should not cause harm.

I searched issue trackers and read the man page but spotted no information that this is an expected behavior.

$ rsync --version 
rsync  version 3.3.0  protocol version 31
Copyright (C) 1996-2024 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, symlinks, symtimes, hardlinks, hardlink-specials,
    hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
    xattrs, optional secluded-args, iconv, prealloc, stop-at, no crtimes
Optimizations:
    SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
    xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
Compress list:
    zstd lz4 zlibx zlib none
Daemon auth list:
    sha512 sha256 sha1 md5 md4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant