becky_cli/becky/providers/remote_provider.py
def _copy_files(self, files, remote_addr, remote_path, ssh_identity_path):
        """
        Copies a list of files from the current server to the remote server.
        Uses rsync to copy the files efficiently.
        """
        paths = [f['name'] for f in files if f['type'] == 'file']
        for file in files:
            if file['type'] == 'directory': continue
            command = 'rsync -e "ssh -i {}" {} {}:{}'.format(ssh_identity_path, file['name'], remote_addr, file['path'])
            os.system(command)
        # files_file = tempfile.NamedTemporaryFile(mode="w")
        # files_file.write('\n'.join(paths))
        # files_file.flush()
        # print(paths[0])
        # command = 'rsync -e "ssh -i {}" --files-from {} / {}:{}'.format(ssh_identity_path, files_file.name, remote_addr, remote_path)
        # os.system(command)
        # files_file.close()
        return files

        Copies a list of files from the current server to the remote server.
        Uses rsync to copy the files efficiently.
        
Copies a list of files from the current server to the remote server.
Uses rsync to copy the files efficiently.
Copies a list of files from the current server to the remote server . Uses rsync to copy the files efficiently .
def _copy_files(self, files, remote_addr, remote_path, ssh_identity_path):
        paths = [f['name'] for f in files if f['type'] == 'file']
        for file in files:
            if file['type'] == 'directory': continue
            command = 'rsync -e "ssh -i {}" {} {}:{}'.format(ssh_identity_path, file['name'], remote_addr, file['path'])
            os.system(command)
        return files
def _copy_files ( self , files , remote_addr , remote_path , ssh_identity_path ) : paths = [ f [ 'name' ] for f in files if f [ 'type' ] == 'file' ] for file in files : if file [ 'type' ] == 'directory' : continue command = 'rsync -e "ssh -i {}" {} {}:{}' . format ( ssh_identity_path , file [ 'name' ] , remote_addr , file [ 'path' ] ) os . system ( command ) return files
Copies a list of files from the current server to the remote server.
Copies a list of files from the current server to the remote server .
"""
        Copies a list of files from the current server to the remote server.
        Uses rsync to copy the files efficiently.
        """ # files_file = tempfile.NamedTemporaryFile(mode="w") # files_file.write('\n'.join(paths)) # files_file.flush() # print(paths[0]) # command = 'rsync -e "ssh -i {}" --files-from {} / {}:{}'.format(ssh_identity_path, files_file.name, remote_addr, remote_path) # os.system(command) # files_file.close()
self
files
remote_addr
remote_path
ssh_identity_path