def untar_backup_files(source):
 logging.info("Untarring backup file '{0}'...".format(source))
 try:
  tar = tarfile.open(source, 'r:gz')
  tar.extractall(path='/')
  tar.close()
 except tarfile.TarError as tar_error:
  logging.exception(tar_error)
  raise backup_exceptions.BRException("Exception while untarring backup file '{0}'.".format(source))
 logging.info("Done untarring '{0}'.".format(source))

def untar_backup_files ( source ) : logging . info ( "Untarring backup file '{0}'..." . format ( source ) ) try : tar = tarfile . open ( source , 'r:gz' ) tar . extractall ( path = '/' ) tar . close ( ) except tarfile . TarError as tar_error : logging . exception ( tar_error ) raise backup_exceptions . BRException ( "Exception while untarring backup file '{0}'." . format ( source ) ) logging . info ( "Done untarring '{0}'." . format ( source ) )
restores a previous backup into the cassandra directory structure from a tar ball .