Обсуждение: import *.backup-file (PostGIS - not mine)
Dear all I have to import and watch/edit data stored in an .backup-file. This is a backup-file, stored by an other firm. My problem is, I am new at Postgres and it is the first time I have to work with PostGIS-data. I installed pgAdminIII and tryed to import it with this program. But it will not work... Can you tell me what I have to do? best regards, Thomas -- View this message in context: http://postgresql.1045698.n5.nabble.com/import-backup-file-PostGIS-not-mine-tp5712030.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 11 June 2012 10:42, gipsy-king1 <stuehle@gis-consult.de> wrote: > I have to import and watch/edit data stored in an .backup-file. This is a > backup-file, stored by an other firm. > Can you tell me what I have to do? Is that a Postgres dump? If so, is it a plain text dump, a compressed dump or a custom format dump? You can restore plain text dumps by reading them in with the psql utility. For the other dump formats you use pg_restore. If it's something else, you'll need to provide a lot more detail for us to know whether the file is at all useful to you. -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.
Am 11.06.2012 14:43, schrieb Alban Hertroys: > On 11 June 2012 10:42, gipsy-king1 <stuehle@gis-consult.de> wrote: >> I have to import and watch/edit data stored in an .backup-file. This is a >> backup-file, stored by an other firm. >> Can you tell me what I have to do? > Is that a Postgres dump? If so, is it a plain text dump, a compressed > dump or a custom format dump? try to use pg_restore with the option: -Fc > > You can restore plain text dumps by reading them in with the psql > utility. For the other dump formats you use pg_restore. > > If it's something else, you'll need to provide a lot more detail for > us to know whether the file is at all useful to you. -- Stefan Tzeggai
There are few errors after my pg_restore command. pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "H:.../netzknotenmodell_etrs89.backup" could not execute query: ERROR: type "public.geometry" is only a shell could not execute query: ERROR: relation "strasse.netzknotenmodell_etrs89" does not exist could not execute query: ERROR: relation "netzknotenmodell_etrs89" does not exist could not execute query: ERROR: relation "netzknotenmodell_etrs89" does not exist could not execute query: ERROR: relation "netzknotenmodell_etrs89" does not exist pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "H:.../fahrbahnflaeche_etrs89.backup" could not execute query: ERROR: type "public.geometry" is only a shell could not execute query: ERROR: relation "strasse.fahrbahnflaeche_etrs89" does not exist could not execute query: ERROR: relation "fahrbahnflaeche_etrs89" does not exist could not execute query: ERROR: relation "fahrbahnflaeche_etrs89" does not exist could not execute query: ERROR: relation "fahrbahnflaeche_etrs89" does not exist pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "H:.../strassenabschnitte_etrs89.backup" could not execute query: ERROR: type "public.geometry" is only a shell could not execute query: ERROR: relation "strasse.strassenabschnitte_etrs89" does not exist could not execute query: ERROR: relation "strassenabschnitte_etrs89" does not exist could not execute query: ERROR: relation "strassenabschnitte_etrs89" does not exist could not execute query: ERROR: relation "strassenabschnitte_etrs89" does not exist pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "H:.../strassennetzmodell_etrs89.backup" could not execute query: ERROR: type "public.geometry" is only a shell could not execute query: ERROR: relation "strasse.strassennetzmodell_etrs89" does not exist could not execute query: ERROR: relation "strassennetzmodell_etrs89" does not exist could not execute query: ERROR: relation "strassennetzmodell_etrs89" does not exist could not execute query: ERROR: relation "strassennetzmodell_etrs89" does not exist I got the same errors when I used the "-Fc". Do you with your experience know whats's to do with these 4 backup-files or which command is to use? best regards Thomas -- View this message in context: http://postgresql.1045698.n5.nabble.com/import-backup-file-PostGIS-tp5712030p5712158.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
gipsy-king1 <stuehle@gis-consult.de> writes: > There are few errors after my pg_restore command. > pg_restore -i -h localhost -p 5432 -U postgres -d THS -v > "H:.../netzknotenmodell_etrs89.backup" > could not execute query: ERROR: type "public.geometry" is only a shell Are these partial dumps? It appears that you don't have postgis installed in the target database, but a full dump should have included the postgis types and functions. If they were partial, what you need to do is install postgis first. regards, tom lane
I think my postgis is installed because of these three following reasons - but I am not 100% sure. 1) With pgAdmin I created a database. The template I took was the "template_postgis" 2) When I open the Application Stack Builder an get the list of all possible applications to install - under "Spataial Extensions" it is written: "PostGIS 1.5 for PostgreSQL 8.3 v 1.5.3(installed) 3) I followed the instructions from this website to install PostGIS: http://www.gpsfiledepot.com/tutorials/installing-and-setting-up-postgresql-with-postgis/ How can I check if PostGIS is 100% installed on my PC? -- View this message in context: http://postgresql.1045698.n5.nabble.com/import-backup-file-could-not-access-file-libdir-liblwgeom-No-such-file-or-directory-tp5712030p5712345.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.