ERROR: relation "xxx" does not exist

All of a sudden my gitlab server's begun to give me a bunch of errors while restoring a backup, I upgraded to version 11.7.0 several weeks ago and everything used to work fine till a couple of days ago, no changes to configuration were made. How can I fix it?

ERROR: relation "public.timelogs" does not exist

ERROR: relation "public.timelogs" does not exist

ERROR: relation "public.ci_builds_metadata" does not exist

ERROR: relation "public.resource_label_events" does not exist

ERROR: relation "public.cluster_groups" does not exist

ERROR: relation "public.board_project_recent_visits" does not exist

ERROR: relation "public.ci_runner_namespaces" does not exist

ERROR: relation "public.ci_build_trace_section_names" does not exist

ERROR: relation "public.merge_requests_closing_issues" does not exist

ERROR: relation "public.internal_ids" does not exist

ERROR: relation "public.events" does not exist

ERROR: relation "public.board_group_recent_visits" does not exist

ERROR: relation "public.import_export_uploads" does not exist

ERROR: relation "public.fork_network_members" does not exist

ERROR: relation "public.label_priorities" does not exist

ERROR: relation "public.merge_request_metrics" does not exist

ERROR: relation "public.ci_builds_metadata" does not exist

ERROR: relation "public.cluster_platforms_kubernetes" does not exist

ERROR: relation "public.label_priorities" does not exist

...

ERROR: table "abuse_reports" does not exist

ERROR: must be owner of extension pg_trgm

ERROR: must be owner of extension plpgsql

ERROR: must be owner of schema public

ERROR: schema "public" already exists

ALTER SCHEMA

ERROR: must be owner of schema public

CREATE EXTENSION

ERROR: must be owner of extension plpgsql

CREATE EXTENSION

ERROR: must be owner of extension pg_trgm

Edited by 🤖 GitLab Bot 🤖