Re: pg_dump

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ramesh T <rameshparnanditech(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, Hubert Lubaczewski <depesz(at)gmail(dot)com>
Subject: Re: pg_dump
Date: 2014-12-16 15:41:20
Message-ID: 549052A0.3080507@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/16/2014 07:29 AM, Ramesh T wrote:
> hi,
> i need to export a file the database
> postgres
> pg_dump -U postgres -C -Fp -f c:/backup/db2.dump db_1;
>
> where i can run pg_dump
> please send me details
>
> i want to export db_1 to db2
> i got an error below
>
> postgres=# pg_dump -U postgres -C -Fp -f c:/backup/db_2.dump
> db_1;
> ERROR: syntax error at or near "pg_dump"
> LINE 1: pg_dump -U postgres -C -Fp -f c:/backup/db_2du...

Are you trying this from inside psql?

If so pg_dump is a command line program and needs to be from the shell
terminal not inside psql.
>
> i'm using putty to connect host
> how to bash to c:\..?

That would depend on where your Postgres server is relative to the c:\
drive.

>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

  • pg_dump at 2014-12-16 15:29:33 from Ramesh T

Responses

  • Re: pg_dump at 2014-12-16 15:55:20 from Adrian Klaver

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-12-16 15:55:20 Re: pg_dump
Previous Message Joseph Kregloh 2014-12-16 15:36:31 Re: Pausing log shipping for streaming replication