Discussion:
[rsnapshot-discuss] rsync error
Terry Barnum
2016-06-15 21:53:17 UTC
Permalink
This is not specifically an rsnapshot question but I'm hoping someone might have some insight.

I have a MacBook Pro user who updated to 10.11 which prevents (even root) from writing into /usr/bin. On previous OSes I used to copy a somewhat current version of rsync (3.0.7) in there and symlink rsync to it. No problem I thought, I'll copy it into /usr/local/bin/ instead which is really where it should've gone anyway. Doing an 'rsync --version' on the MacBook Pro shows 3.0.7 so /usr/local/bin/ is in the path prior to /usr/bin. But when the rsnapshot server runs and connects to the MacBook Pro, rsnapshot throws this error:

***@mbp:/Users/elcapuser rsync error: syntax or usage error (code 1) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/main.c(1333) [server=2.6.9]

For some reason the MacBook Pro appears to still be running the old version installed with the OS. I can't find the above main.c path on it. Not sure what's going on. Any ideas?

Thanks,
-Terry

Terry Barnum
digital OutPost
Carlsbad, CA

http://www.dop.com
800/464-6434
David Cantrell
2016-06-16 12:55:21 UTC
Permalink
Post by Terry Barnum
For some reason the MacBook Pro appears to still be running the old version installed with the OS. I can't find the above main.c path on it. Not sure what's going on. Any ideas?
Depending on the context (an interactive session vs a cron job vs rsync
invoked remotely by another rsync) you'll get a different environment,
and so /usr/local/bin isn't in the $PATH. You need the --rsync-path
option to rsync, so it knows exactly which rsync to run on the remote
host. You can provide that via the rsync_long_args config option in
rsnapshot. And if you only need it on this one host you can do this:

backup what-to-backup where-to-backup +rsync_long_args=--rsync-path=...
--
David Cantrell | Minister for Arbitrary Justice

You can't spell "slaughter" without "laughter"
Terry Barnum
2016-06-16 17:04:39 UTC
Permalink
Post by David Cantrell
Post by Terry Barnum
For some reason the MacBook Pro appears to still be running the old version installed with the OS. I can't find the above main.c path on it. Not sure what's going on. Any ideas?
Depending on the context (an interactive session vs a cron job vs rsync
invoked remotely by another rsync) you'll get a different environment,
and so /usr/local/bin isn't in the $PATH. You need the --rsync-path
option to rsync, so it knows exactly which rsync to run on the remote
host. You can provide that via the rsync_long_args config option in
backup what-to-backup where-to-backup +rsync_long_args=--rsync-path=...
Thank you very much David. I'll give it a try today and report back.

-Terry
Post by David Cantrell
--
David Cantrell | Minister for Arbitrary Justice
Terry Barnum
digital OutPost
Carlsbad, CA

http://www.dop.com
800/464-6434
Terry Barnum
2016-07-06 20:36:45 UTC
Permalink
Post by Terry Barnum
Post by David Cantrell
Post by Terry Barnum
For some reason the MacBook Pro appears to still be running the old version installed with the OS. I can't find the above main.c path on it. Not sure what's going on. Any ideas?
Depending on the context (an interactive session vs a cron job vs rsync
invoked remotely by another rsync) you'll get a different environment,
and so /usr/local/bin isn't in the $PATH. You need the --rsync-path
option to rsync, so it knows exactly which rsync to run on the remote
host. You can provide that via the rsync_long_args config option in
backup what-to-backup where-to-backup +rsync_long_args=--rsync-path=...
Thank you very much David. I'll give it a try today and report back.
My MacOS 10.11 laptop user is back in town and I made the rsync-path change but I'm still seeing errors and no backup is happening.
Post by Terry Barnum
sync_if_different("/Volumes/Backup/laptops/tmp/", \
"/Volumes/Backup/laptops/daily.0/unused1")
/bin/rm -rf /Volumes/Backup/laptops/tmp/
/usr/bin/rsync -av -X -z --numeric-ids --relative --delete \
--delete-excluded --max-size=250M --stats --timeout=1800 \
--exclude-from=/usr/local/etc/rsnapshot.exclude \
--rsync-path=/usr/local/bin/rsync --rsh="/usr/bin/ssh -o \
ConnectTimeout=600" \
--link-dest=/Volumes/Backup/laptops/daily.1/MBPuser/ \
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(173) [Receiver=3.0.7]
----------------------------------------------------------------------------
/usr/local/bin/rsnapshot -c /usr/local/etc/rsnapshot-laptops.conf daily
----------------------------------------------------------------------------
/usr/bin/logger -i -p user.err -t rsnapshot /usr/local/bin/rsnapshot -c \
/usr/local/etc/rsnapshot-laptops.conf daily: ERROR: /usr/bin/rsync \
It still looks like /usr/bin/rsync and not /usr/local/bin/rsync is being called. What am I missing? /usr/local/bin/rsync is a symbolic link to /usr/local/bin/rsync-3.0.7.

Thanks,
-Terry

Terry Barnum
digital OutPost
Carlsbad, CA

http://www.dop.com
800/464-6434
David Cantrell
2016-07-08 12:37:57 UTC
Permalink
Post by Terry Barnum
My MacOS 10.11 laptop user is back in town and I made the rsync-path change but I'm still seeing errors and no backup is happening.
Post by Terry Barnum
sync_if_different("/Volumes/Backup/laptops/tmp/", \
"/Volumes/Backup/laptops/daily.0/unused1")
/bin/rm -rf /Volumes/Backup/laptops/tmp/
/usr/bin/rsync -av -X -z --numeric-ids --relative --delete \
That's /usr/bin/rsync being invoked locally by rsnapshot ...
Post by Terry Barnum
Post by Terry Barnum
--delete-excluded --max-size=250M --stats --timeout=1800 \
--exclude-from=/usr/local/etc/rsnapshot.exclude \
--rsync-path=/usr/local/bin/rsync --rsh="/usr/bin/ssh -o \
... and there's rsnapshot telling /usr/bin/rsync that it should run
/usr/local/bin/rsync on the remote machine.
Post by Terry Barnum
Post by Terry Barnum
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
I believe that's being spat out by your local rsync. Surprisingly, the
man page really is useful in this case.
--
David Cantrell | Bourgeois reactionary pig

You can't spell "slaughter" without "laughter"
Terry Barnum
2016-07-09 00:28:12 UTC
Permalink
Post by David Cantrell
Post by Terry Barnum
My MacOS 10.11 laptop user is back in town and I made the rsync-path change but I'm still seeing errors and no backup is happening.
Post by Terry Barnum
sync_if_different("/Volumes/Backup/laptops/tmp/", \
"/Volumes/Backup/laptops/daily.0/unused1")
/bin/rm -rf /Volumes/Backup/laptops/tmp/
/usr/bin/rsync -av -X -z --numeric-ids --relative --delete \
That's /usr/bin/rsync being invoked locally by rsnapshot ...
Post by Terry Barnum
Post by Terry Barnum
--delete-excluded --max-size=250M --stats --timeout=1800 \
--exclude-from=/usr/local/etc/rsnapshot.exclude \
--rsync-path=/usr/local/bin/rsync --rsh="/usr/bin/ssh -o \
... and there's rsnapshot telling /usr/bin/rsync that it should run
/usr/local/bin/rsync on the remote machine.
Post by Terry Barnum
Post by Terry Barnum
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
I believe that's being spat out by your local rsync. Surprisingly, the
man page really is useful in this case.
Thank you David. I could swear I searched the man page for protocol version mismatch. I must've misplellled it, sorry.

Will try the ssh login tests with this laptop when it's back in town again.

-Terry
Post by David Cantrell
--
David Cantrell | Bourgeois reactionary pig
You can't spell "slaughter" without "laughter"
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
rsnapshot-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Terry Barnum
digital OutPost
Carlsbad, CA

http://www.dop.com
800/464-6434

Continue reading on narkive:
Loading...