I am trying to restore a database from one schema to another schema in postgresql using pgadmin backup and restore utility. The backup is successful for the database A but when I try to do the restore of this to another database B I get the error as shown below.
Do anyone know about this or have faced an issue like this before?
I tried changing the restore options like
- Do not save owner as yes
- Privileges yes etc but still there was no luck.
Sample:
pg_restore: creating TABLE "public.app_role" pg_restore: [archiver (db)] Error from TOC entry 227; 1259 197811 TABLE app_role schedule pg_restore: [archiver (db)] could not execute query: ERROR: role "schedule" does not exist Command was: ALTER TABLE public.app_role OWNER TO schedule;
Thanks