The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Email Subscription

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 717 other subscribers

There has been an ESXi static rsync 3.1.3 binary for a while now (and why I want a much newer version)

Posted by jpluimers on 2026/10/21

This post is a reminder to self to really work on rsync backup of your ESXi box: How to make a statically linked rsync binary.

I’m still catching up on things that happened during my (recovery) of all the cancer treatments in the 2019-2022 time frame.

Which is why I missed two things (actually three if you count the long list of rsync changes up to the current version).

The first is to install the static rsync 3.1.3 binary that runs on ESXi (at least versions 5 through 7, likely 8 as well) on some of my various ESXi boxes.

This is how you get it:

  1. [Wayback/Archive] noelmartinon/vmtools: Tools for VMware ESXi to use in ESXi
    The tools included in the VMtools suite are:
    • ovf-export 1.1.0 – export/backup one or more virtual machines to OVF format
    • ovf-deploy 1.1.0 – deploy/restore a virtual machine from OVF template
    • rsync-static 3.1.3 – a pre-build static rsync version (see usage in https://rsync.samba.org/)

    …

    Install ‘rsync’ (optional)

    1. Get rsync
    This command lines must be execute from a linux console and NOT in ESXi!
    • From vmtools site:
      cd /tmp
      wget https://github.com/noelmartinon/vmtools/master/bin/rsync-static
      mv rsync-static rsync
      chmod 775 rsync
      scp -p rsync root@ESXi_IP:/usr/bin/
      
    • From source (Centos 3.9 required):
      # In CentOS 3.9 (http://vault.centos.org/3.9/isos/i386/CentOS-3.9-server-i386.iso):
      sed -i "s/centos\.org/hmc\.edu/g" /etc/yum.conf
      rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3
      yum groupinstall "Development Tools"
      yum install gcc zlib-devel popt-devel glibc-static popt-static -y
      wget http://rsync.samba.org/ftp/rsync/rsync-3.1.3.tar.gz
      gunzip rsync-3.1.3.tar.gz
      tar -xvf rsync-3.1.3.tar
      cd rsync-3.1.3/
      sed -i "s/<zlib.h>/<zlib.h>\n\n#ifndef Z_INSERT_ONLY\n#define Z_INSERT_ONLY Z_SYNC_FLUSH\n#endif/g" token.c
      ./configure
      make CFLAGS="-static" EXEEXT="-static"
      strip rsync-static
      scp -p rsync-static root@ESXi_IP:/usr/bin/rsync
         
      # /!\ Trying under Debian and other CentOS build OK but got 'segmentation fault' in esxi 
      # sudo apt install libpopt-dev zlibc
      # cd /tmp
      # wget http://rsync.samba.org/ftp/rsync/rsync-3.1.3.tar.gz
      # tar -xvf rsync-3.1.3.tar.gz
      # cd rsync-3.1.3/
      # sed -i "s/<zlib.h>/<zlib.h>\n\n#ifndef Z_INSERT_ONLY\n#define Z_INSERT_ONLY Z_SYNC_FLUSH\n#endif/g" token.c
      # ./configure
      # make CFLAGS="-static" EXEEXT="-static"
      # strip rsync-static
      
  2. [Wayback/Archive] vmtools/bin at master · noelmartinon/vmtools
  3. [Wayback/Archive] vmtools/bin/rsync-static at master · noelmartinon/vmtools
  4. [Wayback] raw.githubusercontent.com/noelmartinon/vmtools/master/bin/rsync-static which you can download using wget https://raw.githubusercontent.com/noelmartinon/vmtools/master/bin/rsync-static -O rsync-static-3.1.3 (if your ESXi is new enough, see ESXi 6.7 and up: embedded busybox wget understands https (finally!))

I also missed the availability of a docker container that should automagically build that binary:

Older steps

[Wayback/Archive] How to make a statically linked Rsync Binary – neddix.com wiki

This document describes how to make a statically linked rsync binary as it is used on page Backup of ESXi Virtual Machines using Affa.

tar xzf rsync-3.0.4.tar.gz
cd rsync-3.0.4
  • build the statically linked binary
make CFLAGS="-static" EXEEXT="-static"
strip rsync-static

rsync changes

Home page at the time of writing had [Wayback/Archive] rsync: Rsync version 3.3.0pre1 released.

Browsing up to the newest version from the [Wayback/Archive] NEWS for rsync 3.1.3 I noticed a few things:

The CVE IDs are even more important to me than other bug fixes in order to get a more recent rsync static binary.

Query

Actually I ran [Wayback/Archive] “esxi” “rsync 3.1.3” – Google Search with all the version numbers up to 3.3.0.

Blog post

ESXi: rsync over ssh between two ESXi machines (and overcoming a potential “sh: rsync: not found”)

–jeroen

Leave a Comment