Correct Syntax For Restore after This Pg_Dump

Questions and answers regarding general SQL and backend databases

Correct Syntax For Restore after This Pg_Dump

Postby cuoredisardegna » Thu Jan 03, 2013 2:05 pm

Hi to All,
excuse for the disturbe.
Could SomeOne resolve this problem?

1.) It was made the following pg_dump:

Code: Select all
pg_dump -h localhost -U user -c -d -R -v db_name >file.sql


2.) Then in another computer was created the Postgres empty db_name.

3.) Then from Servoy was imported the solution (with no sample or raw) wich uses the db_name.

At this point:
1) Is it possible to restore file.sql?
2.) With wich exact syntax command?

Tanks in advance.
Gianni Pinna.
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am

Re: Correct Syntax For Restore after This Pg_Dump

Postby Adelo Herrero » Thu Jan 03, 2013 2:43 pm

Hi all:

1 & 2) Yes from psql console:
Code: Select all
psql -h localhost -U user -W -e -d bbdd_db_name -f file.sql


Best regards.
Adelo Herrero
Adelo Herrero
 
Posts: 103
Joined: Sat Jul 25, 2009 9:24 pm
Location: Requena (Valencia) España

Re: Correct Syntax For Restore after This Pg_Dump

Postby cuoredisardegna » Thu Jan 03, 2013 3:08 pm

Hi All ,

Tank You very much Adelo for Your promt replay.
I am going to execute it.

Hope You will find time and the kindness You spent in Your answer a hundredfold.
Best Rgrds, Adelo.

Gianni Pinna.
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am

Re: Correct Syntax For Restore after This Pg_Dump

Postby cuoredisardegna » Thu Jan 03, 2013 3:45 pm

Sorry,
but the command goes on without :
1) returning error message;
2) restoring data.
Tanks,
Gianni Pinna
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 5 guests