diff --git a/common/snapshots.py b/common/snapshots.py index ae8053c9c..72cf18e81 100644 --- a/common/snapshots.py +++ b/common/snapshots.py @@ -1647,7 +1647,7 @@ def filter(self, return snapshotsFiltered #TODO: move this to config.Config - def rsyncRemotePath(self, path, use_mode = ['ssh', 'ssh_encfs'], quote = '"'): + def rsyncRemotePath(self, path, use_mode = ['ssh', 'ssh_encfs'], quote = ''): """ Format the destination string for rsync depending on which profile is used. diff --git a/common/sshtools.py b/common/sshtools.py index 98a250217..2dfebcd6a 100644 --- a/common/sshtools.py +++ b/common/sshtools.py @@ -554,17 +554,17 @@ def maxArg(): #check rsync rsync1 = tools.rsyncPrefix(self.config, no_perms = False, progress = False) rsync1.append(tmp_file) - rsync1.append('%s@%s:"%s"/' %(self.user, - tools.escapeIPv6Address(self.host), - remote_tmp_dir_1)) + rsync1.append('%s@%s:%s/' %(self.user, + tools.escapeIPv6Address(self.host), + remote_tmp_dir_1)) #check remote rsync hard-link support rsync2 = tools.rsyncPrefix(self.config, no_perms = False, progress = False) rsync2.append('--link-dest=../%s' %os.path.basename(remote_tmp_dir_1)) rsync2.append(tmp_file) - rsync2.append('%s@%s:"%s"/' %(self.user, - tools.escapeIPv6Address(self.host), - remote_tmp_dir_2)) + rsync2.append('%s@%s:%s/' %(self.user, + tools.escapeIPv6Address(self.host), + remote_tmp_dir_2)) for cmd in (rsync1, rsync2): logger.debug('Check rsync command: %s' %cmd, self) diff --git a/common/tools.py b/common/tools.py index 05c61f647..57c459a2d 100644 --- a/common/tools.py +++ b/common/tools.py @@ -577,12 +577,13 @@ def rsyncPrefix(config, if config.nocacheOnLocal(): cmd.append('nocache') cmd.append('rsync') - cmd.extend(('--recursive', # recurse into directories + cmd.extend(('--recursive', # recurse into directories '--times', # preserve modification times '--devices', # preserve device files (super-user only) '--specials', # preserve special files '--hard-links', # preserve hard links - '--human-readable'))# numbers in a human-readable format + '--human-readable', # numbers in a human-readable format + '--protect-args')) # no space splitting, wildcard chars only if config.useChecksum() or config.forceUseChecksum: cmd.append('--checksum')