1

I try to backup esxi via rsync over ssh. I run rsyc but I get error:

# rsync -e ssh -av [email protected]:file.txt .
sh: rsync: not found
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) [receiver=3.0.3]

If I connect with ssh/scp everything is fine.

4 Answers 4

4

You need rsync on your ESXi. You can get a binary here.

2
  • The site reqiure username & password.
    – amiad
    Dec 10, 2013 at 11:32
  • Sorry, it was a typo in the URL. Dec 10, 2013 at 14:40
8

The rsync command is not part of the default ESXi installation. ESXi uses a modified version of Busybox to provide a limited subset of Linux commands on the console. That's why rsync isn't available. While it's possible to dump a statically-compiled rsync binary onto an ESXi host, this is not the way to handle backups with VMware.

You can use scp, however.

There are better tools for VMware backups and handling virtual machines, though.

6

rsync is not installed, or not installed in a location that is in your $PATH on the remote side

2
  • I not run rsync on esxi but linux server. The remote server (esxi in this case) not need installed rsync but ssh only.
    – amiad
    Oct 31, 2013 at 12:24
  • 2
    yes, it has to be installed on both machines.
    – Javier
    Oct 31, 2013 at 13:55
2

why not mount esxi file systems on a third machine with sshfs and rsync support, like so:

#mount src esxi file system
sshfs [email protected]:/vmfs/volumes/ mnt/sshfs/
src="mnt/sshfs/"
vmd="Storage_vmfs5/vm1-data"
#mount dst esxi file system
sshfs [email protected]:/datastore-vms/ mnt/tmp/
dst="mnt/tmp/"
#copy vm files
rsync -av --progress --stats --delete --force "$src$vmd" "$dst"
#unmount
fusermount -u $src; fusermount -u $dst
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .