backup question - Mailing list pgsql-admin

From Kasia Tuszynska
Subject backup question
Date
Msg-id 232B5217AD58584C87019E8933556D11011F008606@redmx2.esri.com
Whole thread Raw
Responses Re: backup question
List pgsql-admin

Hello Postgres Gurus,

 

I have a restore problem.

 

If you do the backup as a text file:

pg_dump.exe -i -h machine -p 5432 -U postgres -F p -v -f "C:\dbname_text.dump.backup" dbname

 

You can see the order in which the restore will happen. And the restore seems to be happening in the following order

create objects  (objects named in descending order of schema name.tablename), adam.table is created before public.table

populate objects  (objects named in descending order of schema name.tablename), adam.table is populated before public.table

grant privs to objects  (objects named in descending order of schema name.tablename) adam.table is granted privs to before public.table

 

The problem arises, if data in lets say the adam schema is dependent on tables in the public schema, since the data in the public schema does not exist yet, being created later.

 

If there was an option to do a backup and restore of a single schema, that would solve my problem.

 

Has anyone dealt with this issue before? Any workarounds?

 

Thank you,

Sincerely,

Kasia

pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Vacuum Full
Next
From: Kasia Tuszynska
Date:
Subject: privilege inheritance to a login role through a group role