Discussion:
[rsnapshot-discuss] rsync error 2
Прокси
2016-01-06 12:37:39 UTC
Permalink
Hello,

I recently upgraded Wheezy backup server to Jessie and since then I'm having
problem with rsnapshot. I'm getting:

/usr/bin/rsnapshot -V sync: ERROR: /usr/bin/rsync returned 2 while
processing ***@host

Running rsync commands from
rsnapshot -t daily
manually works, it's just that it doesn't work when called from
rsnapshot.

What could be the problem?

Thanks!

------------------------------------------------------------------------------
PASZTOR Miklos
2016-01-06 15:00:29 UTC
Permalink
Hi,
Post by Прокси
Hello,
I recently upgraded Wheezy backup server to Jessie and since then I'm having
/usr/bin/rsnapshot -V sync: ERROR: /usr/bin/rsync returned 2 while
Running rsync commands from
rsnapshot -t daily
manually works, it's just that it doesn't work when called from
rsnapshot.
What could be the problem?
Have you customized ssh_args by any chance?

Cheers,
Miklós
--
Прокси
2016-01-06 16:12:04 UTC
Permalink
Post by PASZTOR Miklos
Have you customized ssh_args by any chance?
No, that line is commented. I do have something like this:

backup ***@ip:/ host rsync_long_args=--rsync-path='/usr/local/bin/rsync_wrapper.sh' --exclude-from=/etc/rsnapshot.d/host --delete-excluded

Some of those arguments could be in ssh_args if I'm not mistaken.



------------------------------------------------------------------------------
PASZTOR Miklos
2016-01-06 16:31:23 UTC
Permalink
Post by Прокси
Post by PASZTOR Miklos
Have you customized ssh_args by any chance?
Some of those arguments could be in ssh_args if I'm not mistaken.
At a similar case I solved the problem by replacing:

$result = system(@cmd_stack);

with:

$result = system(join(' ', @cmd_stack));

See e.g.: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721043

Regards,
Miklós
--
David Keegel
2016-01-06 20:04:26 UTC
Permalink
Post by PASZTOR Miklos
Post by Прокси
Post by PASZTOR Miklos
Have you customized ssh_args by any chance?
Please try without the unnecessary single quotes.
Some versions of rsnapshot will run rsync directly without using a
shell to parse the command.
Post by PASZTOR Miklos
Post by Прокси
Some of those arguments could be in ssh_args if I'm not mistaken.
This might solve some problems, but it introduces new problems, like
you can't have directory names or arguments with spaces in them
(unless you take precautions to quote the spaces or something).
Post by PASZTOR Miklos
See e.g.: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721043
Regards,
Miklós
--
--
___________________________________________________________________________
David Keegel <***@cyber.com.au> Cyber IT Solutions Pty. Ltd.
http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration


------------------------------------------------------------------------------
Прокси
2016-01-07 12:10:30 UTC
Permalink
Post by David Keegel
Post by PASZTOR Miklos
Post by Прокси
Post by PASZTOR Miklos
Have you customized ssh_args by any chance?
Please try without the unnecessary single quotes.
Some versions of rsnapshot will run rsync directly without using a
shell to parse the command.
Removing single quotes worked. Thanks!
Post by David Keegel
Post by PASZTOR Miklos
Post by Прокси
Some of those arguments could be in ssh_args if I'm not mistaken.
This might solve some problems, but it introduces new problems, like
you can't have directory names or arguments with spaces in them
(unless you take precautions to quote the spaces or something).
Post by PASZTOR Miklos
See e.g.: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721043
Regards,
Miklós
------------------------------------------------------------------------------
Прокси
2016-01-06 16:25:38 UTC
Permalink
Could you please provide details of the complete error message from rsync
(triggering it via -v). rsync doesn't return just an exit code. And closes
without error description.
Sure.

/usr/bin/rsync -a --rsync-path='/usr/local/bin/rsync_wrapper.sh' \
--exclude-from=/etc/rsnapshot.d/host --delete-excluded \
--rsh=/usr/bin/ssh ***@ip:/ \
/mnt/backup/.sync/host
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(176) [Receiver=3.1.1]
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -v sync
----------------------------------------------------------------------------
ERROR: /usr/bin/rsync returned 2 while processing ***@ip:/



------------------------------------------------------------------------------
Loading...