


Esta página se creó para registrar las acciones y pormenores de actualización de rsync en macOS.
Introducción
La página en español de la Wikipedia describe a rsync como:
«
rsynces una aplicación libre para sistemas de tipo Unix y Microsoft Windows que ofrece transmisión eficiente de datos incrementales, que opera también con datos comprimidos y cifrados. Mediante una técnica de delta encoding, permite sincronizar archivos y directorios entre dos máquinas de una red o entre dos ubicaciones en una misma máquina, minimizando el volumen de datos transferidos. Una característica importante dersyncno encontrada en la mayoría de programas o protocolos es que la copia toma lugar con sólo una transmisión en cada dirección.rsyncpuede copiar o mostrar directorios contenidos y copia de archivos, opcionalmente usando compresión y recursión.«Actuando como un daemon de servidor,
rsyncescucha por defecto el puerto TCP 873, sirviendo archivos en el protocolo nativorsynco vía un terminal remoto como RSH o SSH. En el último caso, el ejecutable del clientersyncdebe ser instalado en el host local y remoto.«
rsyncse distribuye bajo la licencia GNU General Public License.»1
Escenario
Ya he escrito muchas veces de mis necesidades u obsesiones de respaldo de mis equipos. No hace mucho, adicionalmente a mis respaldos usando Time Machine, comencé a hacer «copias de seguridad» de mis directorios más activos o importantes (just in case, you know). Inicialmente hechos a través del Finder pero resultó exageradamente lento y manual. Decidí explorar otras opcoines y así fue que llegué con rsync. Una herramienta muy poderosa pero igualmente compleja.
Creí haber encontrado la solución que buscaba. Mediante un BASH script conteniendo todos los llamados a rsync que necesitaba, reduje el tiempo de respaldo de unas tres horas a sólo 20 minutos. Desafortunadamente algunos tropiezos no me han permitido cerrar este tema como quisiera pero han dado lugar a descubrir algunas cosas. Cosas que registro aquí.
Versiones
Un primer punto a tener presente es que la versión de rsync que se inlcuye en macOS está desactualizada. No diría por mucho pero creo que vale la pena estar consciente de ello, y hay momentos en que cuando algo no funciona como se espera, la duda si no será algo derivado de la obsolescencia no tarda en aparecer. Así recientemente me ha pasado.
Actualización
Dos alternativas de actualización existen (de hecho son tres pero la tercera implica actualizar la del mismo sistema operativo, lo que no es nada recomendable). Ambas consisten en una instalación paralela de esta utilería; una haciendo uso de un administrador de paquetes como Homebrew, y otra más artesanal y manual a manos del usuario.
Homebrew
En macOS «Catalina«, la instalación en mi vieja MBP mediante Homebrew, tomó entre 45 y 60 minutos, que es considerable. Parte de este tiempo se debe a que la recompilación abarca las dependencias que rsync tiene con otras utilerías y bibliotecas (entre ellas openSSL, que es de las «más pesadas»). Lo siguiente es un extracto de dicho proceso.
% brew install rsync
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
...
Warning: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
...
==> Fetching dependencies for rsync: lz4, ca-certificates, openssl@3, popt, cmake, xxhash, xz, zstd, m4, autoconf and automake
==> Fetching lz4
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz
==> Downloading from https://codeload.github.com/lz4/lz4/tar.gz/refs/tags/v1.10.
#-#O=-# #
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2025-
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:8f
######################################################################### 100.0%
==> Fetching openssl@3
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://github.com/openssl/openssl/releases/download/openssl-3.4
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################### 100.0%
==> Fetching popt
==> Downloading https://ghcr.io/v2/homebrew/core/popt/manifests/1.19
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/popt/blobs/sha256:bab861fc16b94
######################################################################### 100.0%
==> Fetching cmake
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################### 100.0%
==> Fetching xxhash
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.3.tar.
==> Downloading from https://codeload.github.com/Cyan4973/xxHash/tar.gz/refs/tag
-=#=- # # #
==> Fetching xz
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://github.com/tukaani-project/xz/releases/download/v5.6.4/x
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################### 100.0%
==> Fetching zstd
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz
==> Downloading from https://codeload.github.com/facebook/zstd/tar.gz/refs/tags/
-=O=- # # # #
==> Fetching m4
==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:e0fec6a49fd80cc
######################################################################### 100.0%
==> Fetching autoconf
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz
######################################################################### 100.0%
==> Fetching automake
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://ftp.gnu.org/gnu/automake/automake-1.17.tar.xz
######################################################################### 100.0%
==> Fetching rsync
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/68e3584
######################################################################### 100.0%
==> Downloading https://download.samba.org/pub/rsync/src/rsync-patches-3.4.1.tar
######################################################################### 100.0%
==> Downloading https://rsync.samba.org/ftp/rsync/rsync-3.4.1.tar.gz
######################################################################### 100.0%
==> Installing dependencies for rsync: m4, autoconf, automake, lz4, ca-certificates, openssl@3, popt, cmake, xxhash, xz and zstd
==> Installing rsync dependency: m4
==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json
==> Pouring m4--1.4.19.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/m4/1.4.19: 14 files, 726.9KB
==> Installing rsync dependency: autoconf
==> ./configure --with-lispdir=/usr/local/Cellar/autoconf/2.72/share/emacs/site-
==> make install
🍺 /usr/local/Cellar/autoconf/2.72: 72 files, 3.6MB, built in 10 seconds
==> Installing rsync dependency: automake
==> ./configure
==> make install
🍺 /usr/local/Cellar/automake/1.17: 134 files, 3.3MB, built in 13 seconds
==> Installing rsync dependency: lz4
==> make install PREFIX=/usr/local/Cellar/lz4/1.10.0
🍺 /usr/local/Cellar/lz4/1.10.0: 24 files, 791.2KB, built in 12 seconds
==> Installing rsync dependency: ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2025-
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/6c1debb525d4dc6007afae4cd2b772105111632b22fc28506550f6dfe27c6d52--ca-certificates-2025-02-25.bottle_manifest.json
==> Pouring ca-certificates--2025-02-25.all.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺 /usr/local/Cellar/ca-certificates/2025-02-25: 4 files, 235.9KB
==> Installing rsync dependency: openssl@3
==> perl ./Configure --prefix=/usr/local/Cellar/openssl@3/3.4.1 --openssldir=/us
==> make
==> make install MANDIR=/usr/local/Cellar/openssl@3/3.4.1/share/man MANSUFFIX=ss
==> make HARNESS_JOBS=4 test TESTS=-test_afalg
==> Downloading https://formulae.brew.sh/api/formula.jws.json
🍺 /usr/local/Cellar/openssl@3/3.4.1: 7,227 files, 34.1MB, built in 14 minutes 48 seconds
==> Installing rsync dependency: popt
==> Downloading https://ghcr.io/v2/homebrew/core/popt/manifests/1.19
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/94e6f7b21ebef77002bacd7723041fffb66adc4c45ea452722ff5ab60d0a14e7--popt-1.19.bottle_manifest.json
==> Pouring popt--1.19.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/popt/1.19: 11 files, 176.6KB
==> Installing rsync dependency: cmake
==> Patching
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/3.31.6 --no-system-libs --paral
==> make
==> make install
==> Downloading https://formulae.brew.sh/api/formula.jws.json
🍺 /usr/local/Cellar/cmake/3.31.6: 3,788 files, 63.4MB, built in 28 minutes 34 seconds
==> Installing rsync dependency: xxhash
==> make install PREFIX=/usr/local/Cellar/xxhash/0.8.3 DISPATCH=1
==> cmake -S cmake_unofficial -B build
==> cmake --build build
==> cmake --install build
🍺 /usr/local/Cellar/xxhash/0.8.3: 28 files, 629.7KB, built in 10 seconds
==> Installing rsync dependency: xz
==> ./configure --disable-silent-rules --disable-nls
==> make check
==> make install
🍺 /usr/local/Cellar/xz/5.6.4: 96 files, 2.3MB, built in 1 minute 31 seconds
==> Installing rsync dependency: zstd
==> cmake -S build/cmake -B builddir -DZSTD_PROGRAMS_LINK_SHARED=ON -DZSTD_BUILD
==> cmake --build builddir
==> cmake --install builddir
🍺 /usr/local/Cellar/zstd/1.5.7: 32 files, 2.7MB, built in 55 seconds
==> Installing rsync
==> Patching
==> Applying patches/fileflags.diff
==> ./configure --with-rsyncd-conf=/usr/local/etc/rsyncd.conf --with-included-po
==> make
==> make install
🍺 /usr/local/Cellar/rsync/3.4.1: 12 files, 1MB, built in 1 minute 4 seconds
==> Running `brew cleanup rsync`...
...
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /usr/local/Cellar/cmake/3.29.5... (3,385 files, 61.9MB)
Removing: /Users/admin/Library/Caches/Homebrew/cmake--3.29.5.tar.gz... (10.7MB)
Removing: /Users/admin/Library/Caches/Homebrew/portable-ruby-3.3.2.el_capitan.bottle.tar.gz... (14MB)
Removing: /Users/admin/Library/Caches/Homebrew/api-source/Homebrew/homebrew-core/6e30579727eaa20f51c251b3f5d4b5478b442f20/Formula/cmake.rb... (3KB)
% >
Código fuente
La instalación desde código fuente (construcción o recompilación, como también puede llamarse) se lleva a cabo con las instrucciones indicadas2 más abajo. Después de descargar el tarball (desde la página del proyecto)3, expandirlo y colocarse en el directorio resultante. Entonces, se procede a revisar ciertos pre-requisitos4 (que fácilmente pueden ser atendidos con Homebrew).
brew install automake
brew install xxhash
brew install zstd
brew install lz4
brew install openssl
Para las mac con Apple Silicon es necesario declarar algunas variables de entorno:
export CFLAGS="-I /opt/homebrew/include"
export LDFLAGS="-L /opt/homebrew/lib"
Como último preparativo, está el decidir en qué ruta se colocará el resultado de la compilación2. Para este caso he decidido que sea en /usr/local/bin.
$ ./configure --prefix=/usr/local
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
...
checking whether -c -o works... yes
checking for _acl... no
checking for __acl... no
checking for _facl... no
checking for __facl... no
checking whether to support ACLs... Using OS X ACLs
checking whether to support extended attributes... Using OS X xattrs
configure.sh: creating ./config.status
config.status: creating Makefile
config.status: creating lib/dummy
config.status: creating zlib/dummy
config.status: creating popt/dummy
config.status: creating shconfig
config.status: creating config.h
rsync 3.4.1 configuration successful
$ make
Si bien la mayoría de las instrucciones al respecto sólo indican como último paso
$ make install
en mi caso, dado que la cuenta de trabajo regular no es administrativa, debo proceder:
$ su admin
$ sudo make install
La invocación de rsync requerirá algunos ajustes para evitar el comando por defecto, el provisto por Apple en la distribución de macOS. Invocándola directamente:
$ /usr/local/bin/rsync --version
rsync version 3.4.1 protocol version 32
Copyright (C) 1996-2025 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, no prealloc, stop-at, crtimes
Optimizations:
no 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
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.
$
Referencias
- Wikipedia, «rsync«, es.wikipedia.org, web. Visited: 2025.03.03. URL: https://es.wikipedia.org/wiki/Rsync
- donmontalvo, «Updating rsync from 2.x to 3.x (because GNU v3 blows chunks)«, jamf.com, blog. Published: ; visited: 2025.03.03. URL: https://community.jamf.com/t5/jamf-pro/updating-rsync-from-2-x-to-3-x-because-gnu-v3-blows-chunks/m-p/141922
- «Home Page«, rsync.samba.org, web. Visited: 2025.03.05. URL: https://rsync.samba.org/
- «How to build and install rsync«, github.com/RsyncProject, repository. Visited: 2025.03.05. URL: https://github.com/RsyncProject/rsync/blob/master/INSTALL.md
|
|
© Todos los derechos reservados. Dr. Eduardo René Rodríguez Avila |
Creación: 2025.03.03 Última actualización: 2025.03.05 |
|||
| El contenido de este sitio puede ser copiado y reproducido libremente mientras no sea alterado y se cite su origen. Marcas y productos registrados son citados por referencia y sin fines de lucro o dolo. Todas las opiniones son a título personal del o los autores de éstas y, salvo sea expresado de otro modo, deben considerarse como registro y expresión de la experiencia de uso de aquello que es tratado. Para conocer más sobre la posición de privacidad y responsabilidad de lo que se presenta en este sitio web y como ha sido obtenido, consulte la declaración al respecto. | |||||
