<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You need to run this on the command line, not in a SQL shell i.e. ;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>C:\Program Files\PostgreSQL\9.1\bin>pg_dump.exe “OPTIONS”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> postgis-users-bounces@lists.osgeo.org [mailto:postgis-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>tasneem dewaswala<br><b>Sent:</b> 14 December 2012 11:05<br><b>To:</b> PostGIS Users Discussion<br><b>Subject:</b> Re: [postgis-users] Error in dumping the database<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am using built-in SQL shell available while postgre installation<o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>and i tried with pgadmin but it gives me same error.<o:p></o:p></p><div><p class=MsoNormal>On Fri, Dec 14, 2012 at 4:27 PM, Sandro Santilli <<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>> wrote:<o:p></o:p></p><p class=MsoNormal>Maybe you're not using a unix-like shell ?<br>Did you give pgadmin a try ? I'm sure it can make dumps.<br><br>--strk;<o:p></o:p></p><div><p class=MsoNormal><br>On Fri, Dec 14, 2012 at 04:24:56PM +0530, tasneem dewaswala wrote:<br>> I tried it from the shell also, but it still gives me the same error<br>> can you tell me proper way of working with shell, since i am not used to<br>> work with that.<br>><br>> On Fri, Dec 14, 2012 at 4:19 PM, Sandro Santilli <<a href="mailto:strk@keybit.net">strk@keybit.net</a>> wrote:<br>><br>> > On Fri, Dec 14, 2012 at 04:07:00PM +0530, tasneem dewaswala wrote:<br>> > > Hello,<br>> > ><br>> > > I am trying to take a backup of my database using<br>> > ><br>> > > pg_dump -Ft *mydatabasename* > *mydatabase*.tar;<br>> > ><br>> > > but it gives me an error as "syntax error at or near "pg_dump""<br>> > > i don't understand what is the problem.<br>> ><br>> > You have to run it from a shell, not from the psql monitor.<br>> > Also, I'd recommend -Fc, not -Ft, for possible use with <a href="http://postgis_restore.pl" target="_blank">postgis_restore.pl</a>[1]<br>> ><br>> > [1]<br>> > <a href="http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_upgrade" target="_blank">http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_upgrade</a><br>> ><br>> > --strk;<o:p></o:p></p></div><div><div><p class=MsoNormal>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div><!--qsdbegin-->
<p> </p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Infoterra Ltd. </span><span style='font-size:7.5pt;font-family:
"Arial","sans-serif";color:black'>Is part of the Astrium GEO-Information Services Division and a wholly owned subsidiary of Astrium, Europe's leading space systems and services specialist.<br>
<br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Disclaimer. </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:#666666'>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.<br>
<br>
Infoterra Limited a company registered in <st1:country-region w:st="on"><st1:place
w:st="on">England</st1:place></st1:country-region> under number 2359955 and
having its registered office at Atlas House, <st1:address w:st="on"><st1:Street
w:st="on">41 Wembley Road</st1:Street>, <st1:City w:st="on">Leicester</st1:City>,
<st1:PostalCode w:st="on">LE3 1UT</st1:PostalCode></st1:address>. VAT number
GB 476 0468 27. <br>
<br>
</span><span style='font-size:10.0pt;font-family:Webdings;color:#009900'>P </span><span
style='font-size:7.5pt;font-family:"Tahoma","sans-serif";color:#009900'>Before
printing, think about the environment </span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<!--qsdend--><br></body></html>