When doing an rsync pull from a remote server using the following command:
/usr/bin/rsync -av -e ssh --delete --chmod=a+rwx,g+rwx,o-wx --dry-run username@server:/remote/path/ /home/dir/local/path
I get the following error:
receiving file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]
When doing the reverse (ie. PUSH) from remote to local, i get the following:
building file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(468) [sender=2.6.8]
I've tried removing the parameters one by one and it seems to be related to the -a flag
Environment
# local machine
Linux lbox 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
# rsync version
rsync version 3.0.7 protocol version 30
# remote machine
FreeBSD rbox 6.4-STABLE FreeBSD 6.4-STABLE #0: Mon Feb 22 01:05:13 EST 2010 UNIX-BSD
rsync version 2.6.8 protocol version 29
Can this be resolved easily?
The FreeBSD box has a six-year-old version of rsync which uses an older protocol version. You can force the new version of rsync to use the old protocol by adding
--protocol=29
to yourrsync
command.Interestingly, putting an intermediary machine between origin and destination machine achieves the desired result:
ie.
machine 1 (origin) >> machine 2 (intermediary) >> machine 3 (destination)