[postgis-users] problem with restoring database postgis 2.0

Bborie Park bkpark at ucdavis.edu
Thu Mar 22 16:17:17 PDT 2012


The pg_dump call is called with "--data-only" so you're not getting any 
table creation information.  And since the new DB doesn't have any 
tables, restoring the data will result in an error.

-bborie

On 03/22/2012 04:14 PM, John Callahan wrote:
> I having a problem with something that is usually straight forward. I am
> moving a database from a Windows 2003 Server box to Windows 2008 Server.
>   Both are x64 but running 32bit Postgres 9.0.7.  The new/destination
> database runs the latest postgis 2.0 binaries (from March 19 or so) and the
> source/older database runs postgis 2.0 libraries from a few months ago.
>
> On the new db, I installed postgres 9.0.7, then postgis 2.0 latest build,
> which created my database.  Of course, the database does not have any
> tables at this point (just the functions, a few views.)
>
> I run pg_dump on the source db as so:
> pg_dump.exe --host localhost --port 5432 --username "username" --role
> "myrole"  --format plain --data-only --verbose --file
> "C:\temp\webdata_20120315.sql" "mydb"
>
> When I try to run the resulting sql on the new server, I get the following
> error:
> ERROR: relation<table_name>  does not exist
>
> If I use --inserts options in pg_dump, I still get the "relation does not
> exist error"   If I use pgAdmin to backup and restore (using the tar
> format), the error is the same.
>
> What am I missing?   Thanks.
>
> - John
>
> ***********************************************
> John Callahan, Research Scientist
> Delaware Geological Survey, University of Delaware
> URL: http://www.dgs.udel.edu
> *************************************************
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list