Das Problem, das ich auf vielen Versionen von MacOS X (Mountain Lion, Mavericks, Yosemite, El Capitan) reproduziert habe, die eine viel zu alte Version von rsync
(2.6.9) und neuere Versionen von Macports (3.x) verwenden, wurde behoben mit der Version 3.1.2.
Standard MacOS X rsync 2.6.9 → Fehler
••On_my_Mac••% /usr/bin/rsync -avE example example2
building file list ... done
._example
example/color-profile-1
example/._color-profile-1
example/index.xml.gz
example/Contents/
rsync: recv_generator: mkdir "/Users/Shared/tmp/example2/example/Contents" failed: Permission denied (13)
*** Skipping everything below this failed directory ***
example/QuickLook/
rsync: recv_generator: mkdir "/Users/Shared/tmp/example2/example/QuickLook" failed: Permission denied (13)
*** Skipping everything below this failed directory ***
rsync: mkstemp "/Users/Shared/tmp/example2/example/.color-profile-1.zFdjjF" failed: Permission denied (13)
rsync: mkstemp "/Users/Shared/tmp/example2/example/.._color-profile-1.ySmazZ" failed: Permission denied (13)
rsync: mkstemp "/Users/Shared/tmp/example2/example/.index.xml.gz.zB0WUl" failed: Permission denied (13)
copyfile(/dev/null, example/Contents, COPYFILE_METADATA) failed:2
copyfile(/dev/null, example/QuickLook, COPYFILE_METADATA) failed:13
sent 157793 bytes received 120 bytes 315826.00 bytes/sec
total size is 461293 speedup is 2.92
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-45/rsync/main.c(992) [sender=2.6.9]
••On_my_Mac••%
Built rsync 3.1.2 → Erfolg
••On_my_Mac••% type rsync
rsync is /opt/local/bin/rsync
••On_my_Mac••% rsync --version
rsync version 3.1.2 protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, no prealloc, file-flags,
HFS-compression
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.
••On_my_Mac••%
••On_my_Mac••% /usr/bin/sudo rm -rf example2
••On_my_Mac••% /opt/local/bin/rsync -avAX --fake-super example example2
sending incremental file list
created directory example2
example/
example/color-profile-1
example/index.xml.gz
example/Contents/
example/Contents/PkgInfo
example/QuickLook/
example/QuickLook/Preview.pdf
example/QuickLook/Thumbnail.jpg
sent 462,152 bytes received 167 bytes 924,638.00 bytes/sec
total size is 461,293 speedup is 1.00
••On_my_Mac••%
2 wichtige Details zu beachten:
- die
-E
Option wurde geändert in -AX
(ACL & erweiterte Attribute)
- die Verwendung von
--fake-super
, um Dateien in schreibgeschützte Verzeichnisse kopieren zu können
So verwenden Sie es auf verschiedenen Macs
Wenn Sie einen Rsync auf einem Remote-Mac ausführen möchten, müssen Sie den rsync
auf dem Remote-Mac eingebauten explizit mit der folgenden --rsync-command
Option aufrufen :
/opt/local/bin/rsync -avAX --fake-super --rsync-command=/opt/local/bin/rsync example remote_MAC:/tmp/example2