I tried it from the shell also, but it still gives me the same error<div>can you tell me proper way of working with shell, since i am not used to work with that.<br><br><div class="gmail_quote">On Fri, Dec 14, 2012 at 4:19 PM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">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>
</div>> pg_dump -Ft *mydatabasename* > *mydatabase*.tar;<br>
<div class="im">><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>
</div>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] <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;<br>
<br>
 <a href="http://www.cartodb.com" target="_blank">http://www.cartodb.com</a> - Map, analyze and build applications with your data<br>
<br>
                                       ~~ <a href="http://strk.keybit.net" target="_blank">http://strk.keybit.net</a><br>
<br>
_______________________________________________<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><br>
</blockquote></div><br></div>