dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

pgAdminIII restore database issue - postgresql

This is a discussion on pgAdminIII restore database issue - postgresql ; Hi, I would like to modify by hand plain text dump of database (in SQL). I've done all changes and now my intention is to use pgAdminIII to restore database. I found in documentation that TAR files are supported so ...


Home > Database Forum > Other Databases > postgresql > pgAdminIII restore database issue

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 09-04-2008, 06:26 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default pgAdminIII restore database issue

Hi,

I would like to modify by hand plain text dump of database (in SQL). I've
done all changes and now my intention is to use pgAdminIII to restore
database. I found in documentation that TAR files are supported so I packed
my sql script using Total Commander. Unfortunatelly button OK in restore
window remains grayed. Does anybody know what is needed to convert plain sql
script to readable for pgAdminIII version?


Reply With Quote
  #2  
Old 09-08-2008, 03:40 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: pgAdminIII restore database issue

Marek wrote:
> I would like to modify by hand plain text dump of database (in SQL). I've
> done all changes and now my intention is to use pgAdminIII to restore
> database. I found in documentation that TAR files are supported so I packed
> my sql script using Total Commander. Unfortunatelly button OK in restore
> window remains grayed. Does anybody know what is needed to convert plain
> sql script to readable for pgAdminIII version?


The tar-Format is not just compressed SQL scripts.

Can't you simply execute the SQL script with pgAdmin III?

Yours,
Laurenz Albe
Reply With Quote
  #3  
Old 09-09-2008, 02:27 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: pgAdminIII restore database issue

Laurenz Albe wrote:
>> I would like to modify by hand plain text dump of database (in SQL). I've
>> done all changes and now my intention is to use pgAdminIII to restore
>> database. I found in documentation that TAR files are supported so I packed
>> my sql script using Total Commander. Unfortunatelly button OK in restore
>> window remains grayed. Does anybody know what is needed to convert plain
>> sql script to readable for pgAdminIII version?

>
> The tar-Format is not just compressed SQL scripts.
>
> Can't you simply execute the SQL script with pgAdmin III?


I had second thoughts:

A plain text dump is probably not something you can restore with
pgAdmin III since it makes use of psql syntax; you can probably only
restore it with psql.

Yours,
Laurenz Albe
Reply With Quote
  #4  
Old 09-09-2008, 02:04 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: pgAdminIII restore database issue

Laurenz ,

> I had second thoughts:
>
> A plain text dump is probably not something you can restore with
> pgAdmin III since it makes use of psql syntax; you can probably only
> restore it with psql.


I have no access to server via terminal :-(


Reply With Quote
  #5  
Old 09-09-2008, 02:13 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: pgAdminIII restore database issue

> The tar-Format is not just compressed SQL scripts.

I any way to create this strange tar/not-tar format having SQL written in
plain text?

> Can't you simply execute the SQL script with pgAdmin III?


No, I can't. First error, like for example a not existing table drop, stops
script execution. It's hard to correct by hand 200MB sized SQL script. If I
remember (I'm not sure) the same script executed from file works fine.
However I'm sure that SQL script executed via psql will not stop on first
error type as mentioned (which exactly is not error). Unfortunatelly I have
no access to psql.


Reply With Quote
  #6  
Old 09-10-2008, 02:39 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: pgAdminIII restore database issue

Marek wrote:
>> A plain text dump is probably not something you can restore with
>> pgAdmin III since it makes use of psql syntax; you can probably only
>> restore it with psql.

>
> I have no access to server via terminal :-(


You don't need shell access.

You can install the PostgreSQL client on your local machine, and it will
talk to the server.

If you are on Windows, just download the Windows installer package from
http://www.postgresql.org/download/windows and install only the client.

If you have pgAdmin III on the machine, maybe you already have psql
installed!

You can use it like this:

psql -h -p -U -d -f

Yours,
Laurenz Albe
Reply With Quote
  #7  
Old 09-10-2008, 07:20 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: pgAdminIII restore database issue

> You can use it like this:
>
> psql -h -p -U -d -f


Of course, I forgot about this solution :-)))
Thanks a lot Laurenz!


Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 12:36 PM.