Domanda

Help! I'm a beginner. I am trying to learn PostgreSQL and I am having a lot of trouble trying to get a sample database into my PostgreSQL server. I got the sample database from here at PgFoundry.org and another called booktown. I chose the dellstore2 db. I really can't find a single tutorial out there taking you through the steps to make this happen.

I keep running into the restore command. In pgAdmin3 I keep trying different ways to use restore on a database that I named the same as the sample db but to no avail? All my research lead to this but it just will not work! Can someone please explain this?

The dellstore2 is in tar gz format and the booktown is an sql file.

È stato utile?

Soluzione

A SQL script is run using the commandline utility psql:

psql -f booktown.sql your_db your_pg_user

A tar gz needs to be unpacked before you can proceed. I assume it then contains a SQL script as well, that you run the same way.

Altri suggerimenti

Postgresql have different way to restore data

1)

psql -f backup.sql dbname

2)

$ pg_restore -d dbname db.tar

3) or use pgadmin

If you want special data restore,(exm GIS data) you have to choose this template in database creator

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top