public static function get_async_backup_links_backup($filename, $contextid) {
        // Parameter validation.
        self::validate_parameters(
                self::get_async_backup_links_backup_parameters(),
                    array(
                        'filename' => $filename,
                        'contextid' => $contextid
                    )
                );

        // Context validation.
        list($context, $course, $cm) = get_context_info_array($contextid);
        self::validate_context($context);
        require_capability('moodle/backup:backupcourse', $context);

        if ($cm) {
            $filearea = 'activity';
        } else {
            $filearea = 'course';
        }

        $results = \async_helper::get_backup_file_info($filename, $filearea, $contextid);

        return $results;
    }