Your message dated Sun, 19 Jul 2015 22:12:32 +0200
with message-id <[email protected]>
and subject line Re: Backups broken when "ssh_args" are set
has caused the Debian Bug report #717451,
regarding Backups broken when "ssh_args" are set
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
717451: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717451
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package:        rsnapshot
Version:        1.3.1-4

Hi!

(NB: Please keep me Cc'ed. Thanks.)

I just updated my backup box and basically all of my rsnapshot jobs
are failing. As it seems, a revert for a "bad fix" was pulled into the
debian package. While the revertion of the fix will probably fix quite
a few problems, it also introduces a new problem when ssh_args are
set.

I'm usually setting ssh_args to something like:

        ssh_args        -p 2345 -i <identify file> -oBatchMode=yes

The non-standard SSH port is to access a number of hosts behind a
NATing router, the identity file and BatchMode should be
self-explanatory.

The former behavior (with the "bad fix" still applied results in a
long command line containing

        rsync ... --rsh="/usr/bin/ssh <my args here>" ...

which is parsed by a shell, thus the `"' around the --rsh value are
eaten away. In the new behavior, the command array is supplied, which
in turn *preserves* the double-quotes for the exec call to rsync.
Thus, later on, it's not "/usr/bin/ssh" with a number of argument
what's being called, but something like "/usr/bin/ssh -i ....", which
of course doesn't exist.

It is non-obvious how to get ssh_args right and I think you cannot use
them at all right now due to wrong quoting while the --rsh=...
argument is prepared. A workaround would be to prepare proper entries
in user's ~/.ssh/config file, and removing the ssh_args option
alltogether.

However, I think that a correct fix to this problem is to simply
remove the added `"' while preparing the --rsh argument for rsync in
case "ssh_args" is set. With the new way of doing the system() call,
supplying an _array_ of single options (instead of a string that needs
to be parsed), these quotes are actually the root cause of rsync's
wrong parsing of the --rsh option:

diff --git a/rsnapshot-program.pl b/rsnapshot-program.pl
index dfd7ef6..9d98de5 100755
--- a/rsnapshot-program.pl
+++ b/rsnapshot-program.pl
@@ -3452,7 +3452,7 @@ sub rsync_backup_point {
                
                # if we have any args for SSH, add them
                if ( defined($ssh_args) ) {
-                       push( @rsync_long_args_stack, 
"--rsh=\"$config_vars{'cmd_ssh'} $ssh_args\"" );
+                       push( @rsync_long_args_stack, 
"--rsh=$config_vars{'cmd_ssh'} $ssh_args" );
                        
                # no arguments is the default
                } else {


(This patch is on-top of
git://anonscm.debian.org/collab-maint/rsnapshot.git and applies with
-40 lines offset on-top of upstream rsnapshot, too.)

Thanks,
Jan-Benedict

-- 
      Jan-Benedict Glaw      [email protected]              +49-172-7608481
Signature of:         Alles wird gut! ...und heute wirds schon ein bißchen 
besser.
the second  :

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
fixed 717451 1.4.0-1
thanks

On Wed, 15 Jul 2015 19:42:21 -0400 Michel <[email protected]>
wrote:
> Package: rsnapshot
> Version: 1.3.1-7
> Followup-For: Bug #717451
>
>
> Dear Maintainer,
>
> After upgrading rsnapshot to 1.3.1-7, remote backups still fail. Local
> backups work as expected. The upgrade occurred on 06/24/2015, and every
> remote backup since then have failed. Have been extremely busy and have
> not checked local email, until today. To my surprise, have no remote
> backups since 06/24.
>
>

I've pushed the 1.4.0-1 release that fix that kind of problem.
Feel free to reopen if it is not the case.

--
Guillaume Delacour

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to