Thread: Backup and Restore from 8.3.0 to 9.1.3

Backup and Restore from 8.3.0 to 9.1.3

From
Kasia Tuszynska
Date:

Hi Everybody,

 

I am experimenting with backups and restores….

I am running into something curious and would appreciate any suggestions.

 

Backing up from:

Postgres 8.3.0

Windows 2003 sp1 server (32bit)

-        Took a compressed binary backup of a single db (the default option in pgAdminIII, right click backup)

-        Took a plane backup of the same single db, (plane option in the right click backup gui in pgAdminIII)

 

Restoring to:

Postgres 9.1.3

Windows 2008 R2 (64bit)

Aside from not finding the pldbgapi.dll, when restoring, what seem to contain debug functions

 

-        Tried restoring the compressed binary backup with pg_restore - Error

o   I get an error message: pg_restore [archiver (db)] could not execute query: ERROR: permissions denied for schema bob

§  The bob schema is owned by the bob user, which is superuser, it is the user with which I am restoring

§  The object being restored :

·        will be placed in and owned by a user/schema rob,

·        the name for this object is derived from a query from a bob owned/stored table,

·        rob is not superuser

·        all schemas grant usage privs to public

·        all users are part of public

-        Tried restoring the plane backup as a .sql file in psql, as the bob user – Success !

o   The object in question was created

 

Question #1: what does the error mean?

-        Does it mean that the bob user cannot create an object in the rob schema?

-        Does it mean that the bob user cannot query from an object stored in the bob schema and owned by bob?

Question #2: if the restore was successful from a sql file but not from a dump file, where is the difference in the restoration process from those two files?

-        Is there a difference in locking or concurrency mechanisms employed by those two restoration methods?

-        I listed out the objects in the dump file, does the list indicate the order of restoration?

Question #3: the object is a gist index, we are also restoring a btree index, the btree index name also derives from a query on a bob owned/stored table, and yet the btree index gets created with both restoration methods, but the gist does not

-        Could this experience have anything to do with this being a gist index?

 

Thank you,

Sincerely,

Kasia

Re: Backup and Restore from 8.3.0 to 9.1.3

From
Craig Ringer
Date:
On 09/21/2012 01:01 AM, Kasia Tuszynska wrote:
> Hi Everybody,
>
> I am experimenting with backups and restores….
>
> I am running into something curious and would appreciate any suggestions.
>
> Backing up from:
>
> Postgres 8.3.0
>
> Windows 2003 sp1 server (32bit)
>
> -Took a compressed binary backup of a single db (the default option in
> pgAdminIII, right click backup)
>
> -Took a plane backup of the same single db, (plane option in the right
> click backup gui in pgAdminIII)

Did you back up using the old version of PgAdmin-III with the old
pg_dump? If so, problems restoring into PostgreSQL 9.1 are likely.

If possible, dump the old database using the *new* pg_dump. If you're
using the PgAdmin-III GUI, connecting to the old DB from the new PgAdmin
on the new computer should do the trick.

--
Craig Ringer



Backup and Restore from 8.3.0 to 9.1.3

From
Kasia Tuszynska
Date:

Hi Everybody,

 

I am experimenting with backups and restores….

I am running into something curious and would appreciate any suggestions.

 

Backing up from:

Postgres 8.3.0

Windows 2003 sp1 server (32bit)

-        Took a compressed binary backup of a single db (the default option in pgAdminIII, right click backup)

-        Took a plane backup of the same single db, (plane option in the right click backup gui in pgAdminIII)

 

Restoring to:

Postgres 9.1.3

Windows 2008 R2 (64bit)

Aside from not finding the pldbgapi.dll, when restoring, what seem to contain debug functions

 

-        Tried restoring the compressed binary backup with pg_restore - Error

o   I get an error message: pg_restore [archiver (db)] could not execute query: ERROR: permissions denied for schema bob

§  The bob schema is owned by the bob user, which is superuser, it is the user with which I am restoring

§  The object being restored :

·        will be placed in and owned by a user/schema rob,

·        the name for this object is derived from a query from a bob owned/stored table,

·        rob is not superuser

·        all schemas grant usage privs to public

·        all users are part of public

-        Tried restoring the plane backup as a .sql file in psql, as the bob user – Success !

o   The object in question was created

 

Question #1: what does the error mean?

-        Does it mean that the bob user cannot create an object in the rob schema?

-        Does it mean that the bob user cannot query from an object stored in the bob schema and owned by bob?

Question #2: if the restore was successful from a sql file but not from a dump file, where is the difference in the restoration process from those two files?

-        Is there a difference in locking or concurrency mechanisms employed by those two restoration methods?

-        I listed out the objects in the dump file, does the list indicate the order of restoration?

Question #3: the object is a gist index, we are also restoring a btree index, the btree index name also derives from a query on a bob owned/stored table, and yet the btree index gets created with both restoration methods, but the gist does not

-        Could this experience have anything to do with this being a gist index?

 

Thank you,

Sincerely,

Kasia