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 jbg...@lug-owl.de +49-172-7608481 Signature of: Alles wird gut! ...und heute wirds schon ein bißchen besser. the second :
signature.asc
Description: Digital signature