becky_cli/becky/providers/s3_provider.py
def backup_files(self, new_files, current_timestamp):
        """
        Receives a list of files to be backed up. 
        TODO: Use rsync or something a bit more efficient than
        going through files one at a time.
        """
        bucket_name = self._get_parameter('bucket_name')
        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(bucket_name)
            if os.path.isdir(file_in): 
                saved_file = {'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'directory', 'date': current_timestamp}
            else:
                saved_file = {'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'file', 'date': current_timestamp}
            self._copy_file(saved_file)
            saved_files.append(saved_file)
        return saved_files

        Receives a list of files to be backed up. 
        TODO: Use rsync or something a bit more efficient than
        going through files one at a time.
        
Receives a list of files to be backed up.
TODO: Use rsync or something a bit more efficient than
going through files one at a time.
Receives a list of files to be backed up . TODO : Use rsync or something a bit more efficient than going through files one at a time .
def backup_files(self, new_files, current_timestamp):
        bucket_name = self._get_parameter('bucket_name')
        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(bucket_name)
            if os.path.isdir(file_in): 
                saved_file = {'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'directory', 'date': current_timestamp}
            else:
                saved_file = {'name': file_in, 'directory': directory_path, 'path': file_out, 'type': 'file', 'date': current_timestamp}
            self._copy_file(saved_file)
            saved_files.append(saved_file)
        return saved_files
def backup_files ( self , new_files , current_timestamp ) : bucket_name = self . _get_parameter ( 'bucket_name' ) 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 ( bucket_name ) if os . path . isdir ( file_in ) : saved_file = { 'name' : file_in , 'directory' : directory_path , 'path' : file_out , 'type' : 'directory' , 'date' : current_timestamp } else : saved_file = { 'name' : file_in , 'directory' : directory_path , 'path' : file_out , 'type' : 'file' , 'date' : current_timestamp } self . _copy_file ( saved_file ) saved_files . append ( saved_file ) return saved_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. 
        TODO: Use rsync or something a bit more efficient than
        going through files one at a time.
        """
self
new_files
current_timestamp