becky_cli/becky/providers/remote_provider.py
def backup_files(self, new_files, current_timestamp):
        """
        Receives a list of files to be backed up. 
        """
        new_files.sort(key=lambda x: x) # Sort, so folders will be created before any files are copied in.
        remote_addr = self._get_parameter('remote_addr')
        remote_copy_path = self._get_parameter('remote_path')
        ssh_identity_path = self._get_parameter('ssh_id_path')
        saved_files = []
        for file_in_index, file_in in enumerate(new_files):
            directory_path = file_in.rsplit("/", 1)[0]
            if not directory_path: directory_path = '/'
            file_out = self._generate_output_path(remote_copy_path)
            if os.path.isdir(file_in): 
                saved_files.append({'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'directory', 'date': current_timestamp})
            else:
                saved_files.append({'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'file', 'date': current_timestamp})
        copied_files = self._copy_files(saved_files, remote_addr, remote_copy_path, ssh_identity_path)
        return copied_files

        Receives a list of files to be backed up. 
        
Receives a list of files to be backed up.
Receives a list of files to be backed up .
def backup_files(self, new_files, current_timestamp):
        new_files.sort(key=lambda x: x) 
        remote_addr = self._get_parameter('remote_addr')
        remote_copy_path = self._get_parameter('remote_path')
        ssh_identity_path = self._get_parameter('ssh_id_path')
        saved_files = []
        for file_in_index, file_in in enumerate(new_files):
            directory_path = file_in.rsplit("/", 1)[0]
            if not directory_path: directory_path = '/'
            file_out = self._generate_output_path(remote_copy_path)
            if os.path.isdir(file_in): 
                saved_files.append({'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'directory', 'date': current_timestamp})
            else:
                saved_files.append({'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'file', 'date': current_timestamp})
        copied_files = self._copy_files(saved_files, remote_addr, remote_copy_path, ssh_identity_path)
        return copied_files
def backup_files ( self , new_files , current_timestamp ) : new_files . sort ( key = lambda x : x ) remote_addr = self . _get_parameter ( 'remote_addr' ) remote_copy_path = self . _get_parameter ( 'remote_path' ) ssh_identity_path = self . _get_parameter ( 'ssh_id_path' ) saved_files = [ ] for file_in_index , file_in in enumerate ( new_files ) : directory_path = file_in . rsplit ( "/" , 1 ) [ 0 ] if not directory_path : directory_path = '/' file_out = self . _generate_output_path ( remote_copy_path ) if os . path . isdir ( file_in ) : saved_files . append ( { 'name' : file_in , 'directory' : directory_path , 'path' : file_out , 'type' : 'directory' , 'date' : current_timestamp } ) else : saved_files . append ( { 'name' : file_in , 'directory' : directory_path , 'path' : file_out , 'type' : 'file' , 'date' : current_timestamp } ) copied_files = self . _copy_files ( saved_files , remote_addr , remote_copy_path , ssh_identity_path ) return copied_files
Receives a list of files to be backed up.
Receives a list of files to be backed up .
"""
        Receives a list of files to be backed up. 
        """ # Sort, so folders will be created before any files are copied in.
self
new_files
current_timestamp