'Uses rsync to implement the sync method. This was the first
sync method in Swift.'

def rsync(self, node, job, suffixes):

    if (not os.path.exists(job['path'])):
        return (False, {})
    args = ['rsync', '--recursive', '--whole-file', '--human-readable', '--xattrs', '--itemize-changes', '--ignore-existing', ('--timeout=%s' % self.rsync_io_timeout), ('--contimeout=%s' % self.rsync_io_timeout), ('--bwlimit=%s' % self.rsync_bwlimit), ('--exclude=.*.%s' % ''.join(('[0-9a-zA-Z]' for i in range(6))))]
    if (self.rsync_compress and (job['region'] != node['region'])):
        args.append('--compress')
    rsync_module = rsync_module_interpolation(self.rsync_module, node)
    had_any = False
    for suffix in suffixes:
        spath = join(job['path'], suffix)
        if os.path.exists(spath):
            args.append(spath)
            had_any = True
    if (not had_any):
        return (False, {})
    data_dir = get_data_dir(job['policy'])
    args.append(join(rsync_module, node['device'], data_dir, job['partition']))
    return ((self._rsync(args) == 0), {})
