rsync
rsync copied to clipboard
hlink node data already has path, attempted copying of hardlinks fails on osx
attempting to run rsync -axWH . /Volumes/<mounted sparse bundle, journaled hfs>/0/ on a
ProductName: macOS
ProductVersion: 12.4
BuildVersion: 21F79
%sysctl -n machdep.cpu.brand_string
Apple M1 Max
and it fails with
Hlink node data for 776 already has path=.cargo/bin/cargo (.cargo/bin/cargo)
rsync error: errors with program diagnostics (code 13) at hlink.c(539) [generator=v3.2.4-16-gd1e42ffa]
https://github.com/WayneD/rsync/blob/master/hlink.c#L536-L543
This problem manifests in both
% rsync --version
rsync version 3.2.4 protocol version 31
Copyright (C) 1996-2022 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 protect-args, iconv, no prealloc, stop-at, crtimes,
file-flags
Optimizations:
no SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
xxh128 xxh3 xxh64 (xxhash) md5 md4 none
Compress list:
zstd lz4 zlibx zlib none
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
as well as (compiled from head, d1e42ffa1680b65bc878ab5a6cbfd12bf6345b9b)
% ~/s/opt/rsync-head/bin/rsync --version
rsync version v3.2.4-16-gd1e42ffa protocol version 31
Copyright (C) 1996-2022 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 protect-args, iconv, no prealloc, stop-at, crtimes
Optimizations:
no SIMD-roll, no asm-roll, no openssl-crypto, no asm-MD5
Checksum list:
md5 md4 none
Compress list:
zlibx zlib none
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
The external file system DOES support hardlinks,
(p310.env) seanj@promax % touch bar
(p310.env) seanj@promax % ln bar baz
(p310.env) seanj@promax % ll
total 0
0 drwxr-x--- 53 seanj staff 1802 Jun 22 13:36 0
0 -rw-r--r-- 2 seanj staff 0 Jun 22 13:36 bar
0 -rw-r--r-- 2 seanj staff 0 Jun 22 13:36 baz
(p310.env) seanj@promax % stat -f "%l %N" bar baz
2 bar
2 baz
(p310.env) seanj@promax % rm bar
(p310.env) seanj@promax % stat -f "%l %N" bar baz
stat: bar: stat: No such file or directory
1 baz
The hardlinks it is failing on are symlinks to a path that is not being copied
bin % ls -ls
total 234952
10264 -rwxr-xr-x 1 seanj staff 5254977 Jun 13 19:56 bat
8 -rwxr-xr-x 1 seanj staff 289 Mar 20 12:16 binblaster
11376 -rwxr-xr-x 1 seanj staff 5823176 Jun 14 11:08 broot
0 lrwxr-xr-x 1 seanj staff 18 Apr 17 16:14 callback.wasm -> wabt/callback.wasm
0 lrwxr-xr-x 12 seanj staff 29 Jan 28 19:20 cargo -> /opt/homebrew/bin/rustup-init
12392 -rwxr-xr-x 1 seanj staff 6343911 Apr 18 19:55 cargo-add
0 lrwxr-xr-x 12 seanj staff 29 Jan 28 19:20 cargo-clippy -> /opt/homebrew/bin/rustup-init
11664 -rwxr-xr-x 1 seanj staff 5971114 Apr 17 10:34 cargo-expand
0 lrwxr-xr-x 12 seanj staff 29 Jan 28 19:20 cargo-fmt -> /opt/homebrew/bin/rustup-init
0 lrwxr-xr-x 12 seanj staff 29 Jan 28 19:20 cargo-miri -> /opt/homebrew/bin/rustup-init
3840 -rwxr-xr-x 1 seanj staff 1963862 Apr 18 19:55 cargo-rm
4000 -rwxr-xr-x 1 seanj staff 2046527 Apr 18 19:55 cargo-set-version
7752 -rwxr-xr-x 1 seanj staff 3966203 Apr 18 19:55 cargo-upgrade
8 -rwxr-xr-x 1 seanj staff 476 Jun 16 20:29 clion
% stat -f "%l %N" cargo*
12 cargo
1 cargo-add
12 cargo-clippy
1 cargo-expand
12 cargo-fmt
12 cargo-miri
1 cargo-rm
1 cargo-set-version
1 cargo-upgrade