4

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?

7

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 your rsync command.

  • This seemed to be the logical answer. I tried (on both ends) and the same error :( – denormalizer Oct 5 '12 at 4:17
  • 1
    The next step, then, is to update the antique version of rsync. – Michael Hampton Oct 5 '12 at 4:26
  • Haha. I'll see if that's feasible. Thanks – denormalizer Oct 5 '12 at 4:28
  • I'm surprised rsync didn't fall back - it's usually good about that... – voretaq7 Oct 5 '12 at 14:06
  • @voretaq7 In fact, I think it did. But it still didn't help. As you can see from my comment, even when I forced the protocol it still complained. – denormalizer Oct 8 '12 at 0:09
3

Interestingly, putting an intermediary machine between origin and destination machine achieves the desired result:

ie.

machine 1 (origin) >> machine 2 (intermediary) >> machine 3 (destination)

machine 1: rsync  version 2.6.8  protocol version 29
machine 2: rsync  version 3.0.3  protocol version 30
machine 3: rsync  version 3.0.7  protocol version 30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.