@staticmethod
def check_if_backup_prepared(full_dir, full_backup_file):
    """
        This method is for checking if the backup can be copied-back.
        It is going to check xtrabackup_checkpoints file inside backup directory for backup_type column.
        backup_type column must be equal to 'full-prepared'
        :return: True if backup is already prepared; RuntimeError if it is not.
        """
    with open('{}/{}/xtrabackup_checkpoints'.format(full_dir,
        full_backup_file), 'r') as xchk_file:
        if xchk_file.readline().split('=')[1].strip('\n').lstrip(
            ) == 'full-prepared':
            return True
        else:
            raise RuntimeError(
                'This full backup is not fully prepared, not doing copy-back!')
