#NEWLINE# def _run_internal( self , endpoint , ks_manifest , component ) : #NEWLINE# #INDENT# 'Backup the cassandra file and keyspace manifest. \n\n        Let errors from here buble out. \n        \n        Returns `True` if the file was uploaded, `False` otherwise.\n        ' #NEWLINE# self . log . info ( 'Uploading file %s' , component ) #NEWLINE# if component . is_deleted : #NEWLINE# #INDENT# endpoint . backup_keyspace ( ks_manifest ) #NEWLINE# self . log . info ( 'Uploaded backup set %s after deletion of %s' , ks_manifest . backup_path , component ) #NEWLINE# return #NEWLINE# #UNINDENT# backup_file = cassandra . BackupFile ( component . file_path , host = self . args . host , component = component ) #NEWLINE# if endpoint . exists ( backup_file . backup_path ) : #NEWLINE# #INDENT# if endpoint . validate_checksum ( backup_file . backup_path , backup_file . md5 ) : #NEWLINE# #INDENT# self . log . info ( 'Skipping file %s skipping as there is a valid backup' , backup_file ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . log . warn ( 'Possibly corrupt file %s in the backup, skipping.' , backup_file ) #NEWLINE# #UNINDENT# return False #NEWLINE# #UNINDENT# uploaded_path = endpoint . backup_file ( backup_file ) #NEWLINE# endpoint . backup_keyspace ( ks_manifest ) #NEWLINE# self . log . info ( 'Uploaded file %s to %s' , backup_file . file_path , uploaded_path ) #NEWLINE# return True