You need to run this on the command line, not in a SQL shell i.e. ;

 

C:\Program Files\PostgreSQL\9.1\bin>pg_dump.exe "OPTIONS"

 

From: [email protected]
[mailto:[email protected]] On Behalf Of tasneem
dewaswala
Sent: 14 December 2012 11:05
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Error in dumping the database

 

I am using built-in SQL shell available while postgre installation

and i tried with pgadmin but it gives me same error.

On Fri, Dec 14, 2012 at 4:27 PM, Sandro Santilli <[email protected]>
wrote:

Maybe you're not using a unix-like shell ?
Did you give pgadmin a try ? I'm sure it can make dumps.

--strk;


On Fri, Dec 14, 2012 at 04:24:56PM +0530, tasneem dewaswala wrote:
> I tried it from the shell also, but it still gives me the same error
> can you tell me proper way of working with shell, since i am not used
to
> work with that.
>
> On Fri, Dec 14, 2012 at 4:19 PM, Sandro Santilli <[email protected]>
wrote:
>
> > On Fri, Dec 14, 2012 at 04:07:00PM +0530, tasneem dewaswala wrote:
> > > Hello,
> > >
> > > I am trying to take a backup of my database using
> > >
> > > pg_dump -Ft *mydatabasename* > *mydatabase*.tar;
> > >
> > > but it gives me an error as "syntax error at or near "pg_dump""
> > > i don't understand what is the problem.
> >
> > You have to run it from a shell, not from the psql monitor.
> > Also, I'd recommend -Fc, not -Ft, for possible use with
postgis_restore.pl[1]
> >
> > [1]
> >
http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_u
pgrade
> >
> > --strk;

_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

 


Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and a 
wholly owned subsidiary of Astrium, Europe's leading space systems and services 
specialist.

Disclaimer. The information contained in this e-mail and its attachments are 
confidential and intended only for the use of the named addressee(s). If you 
are not the intended addressee, please do not read, copy, use or disclose this 
message or its attachments. If you have received this message in error, please 
notify the sender immediately and delete or destroy all copies of this message 
and attachments in all media. Any views or opinions expressed are solely those 
of the author and do not necessarily represent those of Infoterra Ltd and shall 
not form part of any binding agreement.

Infoterra Limited a company registered in England under number 2359955 and 
having its registered office at Atlas House, 41 Wembley Road, Leicester, LE3 
1UT. VAT number GB 476 0468 27. 

P Before printing, think about the environment 

_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to