pg_dump
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...
i'm using putty to connect host
how to bash to c:\..?
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 detailsi want to export db_1 to db2
i got an error belowpostgres=# 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.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 12/16/2014 07:52 AM, Ramesh T wrote:
CCing list.
1.
-bash-4.1$ pg_dump -C -Fp -f C:\backup\db_1.dump db_2how to export and where i can save export file
Per my previous post:
That would depend on where your Postgres server is relative to the c:\
drive.
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Import Notes
Reply to msg id not found: CAK8Zd=vEDFFo7MSeqAxVBH6Z=7o6nBE7_O8Z3O095REzv-PpPw@mail.gmail.com
On 12/16/2014 07:52 AM, Ramesh T wrote:
1. -bash-4.1$ pg_dump -C -Fp -f C:\backup\db_1.dump db_2
I doubt that you'll have much success pg_dumping to a Windows path when
running from within a UNIX shell ?
I didn't see the beginning of this thread -- are you running bash under
Windows by way of Cygwin or some such ?
Karsten
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
C:\Program Files\pgAdmin III\1.14>pg_dump -U postgres -p 5432 -C -f
c:\backup\db_2.dump db_1;
pg_dump: [archiver (db)] connection to database "db_1;"
failed: coul
d not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and
accepting
TCP/IP connections on port 5432?
is it right excution process ,if it is yes 5432..?
On Tue, Dec 16, 2014 at 9:25 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
Show quoted text
On 12/16/2014 07:52 AM, Ramesh T wrote:
CCing list.1.
-bash-4.1$ pg_dump -C -Fp -f C:\backup\db_1.dump db_2
how to export and where i can save export file
Per my previous post:
That would depend on where your Postgres server is relative to the c:\
drive.--
Adrian Klaver
adrian.klaver@aklaver.com
On 12/16/2014 08:17 AM, Ramesh T wrote:
C:\Program Files\pgAdmin III\1.14>pg_dump -U postgres -p 5432 -C -f
c:\backup\db_2.dump db_1;
pg_dump: [archiver (db)] connection to database "db_1;"failed: coul
d not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) andaccepting
TCP/IP connections on port 5432?is it right excution process ,if it is yes 5432..?
Previously you where using PuTTY to log in to the machine with the
Postgres server, so I assume it is not running on the Windows machine.
If that is the case doing the above is bound to fail. What the error is
telling you is that pg_dump cannot find a Postgres instance listening
where you told it to go. Bottom line is you need to be more accurate in
what you are doing.
So:
1) Back to my first post; "That would depend on where your Postgres
server is relative to the c\ drive."
What machine is the Postgres server located on?
What machine are you trying to connect from?
Everything you posted relates to the above. These questions need to be
answered before we can go any further.
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I'm installed pgadmin 3 on windows I'm trying to connect server.the server
is on Linux.now I'm trying pgdump from windows from using putty connected
to Linux Postgres server..also last mail I sent trying from windows local
c:\... :)
On Wednesday, December 17, 2014, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
Show quoted text
On 12/16/2014 08:17 AM, Ramesh T wrote:
C:\Program Files\pgAdmin III\1.14>pg_dump -U postgres -p 5432 -C -f
c:\backup\db_2.dump db_1;
pg_dump: [archiver (db)] connection to database "db_1;"failed: coul
d not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) andaccepting
TCP/IP connections on port 5432?is it right excution process ,if it is yes 5432..?
Previously you where using PuTTY to log in to the machine with the
Postgres server, so I assume it is not running on the Windows machine. If
that is the case doing the above is bound to fail. What the error is
telling you is that pg_dump cannot find a Postgres instance listening where
you told it to go. Bottom line is you need to be more accurate in what you
are doing.So:
1) Back to my first post; "That would depend on where your Postgres server
is relative to the c\ drive."What machine is the Postgres server located on?
What machine are you trying to connect from?
Everything you posted relates to the above. These questions need to be
answered before we can go any further.--
Adrian Klaver
adrian.klaver@aklaver.com
Please let me know what happend inside ..?
On Wednesday, December 17, 2014, Ramesh T <rameshparnanditech@gmail.com>
wrote:
Show quoted text
I'm installed pgadmin 3 on windows I'm trying to connect server.the server
is on Linux.now I'm trying pgdump from windows from using putty connected
to Linux Postgres server..also last mail I sent trying from windows local
c:\... :)
On Wednesday, December 17, 2014, Adrian Klaver <adrian.klaver@aklaver.com
<javascript:_e(%7B%7D,'cvml','adrian.klaver@aklaver.com');>> wrote:On 12/16/2014 08:17 AM, Ramesh T wrote:
C:\Program Files\pgAdmin III\1.14>pg_dump -U postgres -p 5432 -C -f
c:\backup\db_2.dump db_1;
pg_dump: [archiver (db)] connection to database "db_1;"failed: coul
d not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) andaccepting
TCP/IP connections on port 5432?is it right excution process ,if it is yes 5432..?
Previously you where using PuTTY to log in to the machine with the
Postgres server, so I assume it is not running on the Windows machine. If
that is the case doing the above is bound to fail. What the error is
telling you is that pg_dump cannot find a Postgres instance listening where
you told it to go. Bottom line is you need to be more accurate in what you
are doing.So:
1) Back to my first post; "That would depend on where your Postgres
server is relative to the c\ drive."What machine is the Postgres server located on?
What machine are you trying to connect from?
Everything you posted relates to the above. These questions need to be
answered before we can go any further.--
Adrian Klaver
adrian.klaver@aklaver.com
problem solved,
C:\Program Files\pgadmin\bin>pg_dump -U postgres host -p port -C -f
c:\bb\db_1 db_2
then
to import i used psql
On Wed, Dec 17, 2014 at 10:44 AM, Ramesh T <rameshparnanditech@gmail.com>
wrote:
Show quoted text
Please let me know what happend inside ..?
On Wednesday, December 17, 2014, Ramesh T <rameshparnanditech@gmail.com>
wrote:I'm installed pgadmin 3 on windows I'm trying to connect server.the
server is on Linux.now I'm trying pgdump from windows from using putty
connected to Linux Postgres server..also last mail I sent trying from
windows local c:\... :)
On Wednesday, December 17, 2014, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:On 12/16/2014 08:17 AM, Ramesh T wrote:
C:\Program Files\pgAdmin III\1.14>pg_dump -U postgres -p 5432 -C -f
c:\backup\db_2.dump db_1;
pg_dump: [archiver (db)] connection to database "db_1;"failed: coul
d not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) andaccepting
TCP/IP connections on port 5432?is it right excution process ,if it is yes 5432..?
Previously you where using PuTTY to log in to the machine with the
Postgres server, so I assume it is not running on the Windows machine. If
that is the case doing the above is bound to fail. What the error is
telling you is that pg_dump cannot find a Postgres instance listening where
you told it to go. Bottom line is you need to be more accurate in what you
are doing.So:
1) Back to my first post; "That would depend on where your Postgres
server is relative to the c\ drive."What machine is the Postgres server located on?
What machine are you trying to connect from?
Everything you posted relates to the above. These questions need to be
answered before we can go any further.--
Adrian Klaver
adrian.klaver@aklaver.com
is their any other method to clone database,other then pgadmin and pgdump..
if is their option pls let me know..
On Wed, Dec 17, 2014 at 4:35 PM, Ramesh T <rameshparnanditech@gmail.com>
wrote:
Show quoted text
problem solved,
C:\Program Files\pgadmin\bin>pg_dump -U postgres host -p port -C -f
c:\bb\db_1 db_2
then
to import i used psqlOn Wed, Dec 17, 2014 at 10:44 AM, Ramesh T <rameshparnanditech@gmail.com>
wrote:Please let me know what happend inside ..?
On Wednesday, December 17, 2014, Ramesh T <rameshparnanditech@gmail.com>
wrote:I'm installed pgadmin 3 on windows I'm trying to connect server.the
server is on Linux.now I'm trying pgdump from windows from using putty
connected to Linux Postgres server..also last mail I sent trying from
windows local c:\... :)
On Wednesday, December 17, 2014, Adrian Klaver <
adrian.klaver@aklaver.com> wrote:On 12/16/2014 08:17 AM, Ramesh T wrote:
C:\Program Files\pgAdmin III\1.14>pg_dump -U postgres -p 5432 -C -f
c:\backup\db_2.dump db_1;
pg_dump: [archiver (db)] connection to database "db_1;"failed: coul
d not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) andaccepting
TCP/IP connections on port 5432?is it right excution process ,if it is yes 5432..?
Previously you where using PuTTY to log in to the machine with the
Postgres server, so I assume it is not running on the Windows machine. If
that is the case doing the above is bound to fail. What the error is
telling you is that pg_dump cannot find a Postgres instance listening where
you told it to go. Bottom line is you need to be more accurate in what you
are doing.So:
1) Back to my first post; "That would depend on where your Postgres
server is relative to the c\ drive."What machine is the Postgres server located on?
What machine are you trying to connect from?
Everything you posted relates to the above. These questions need to be
answered before we can go any further.--
Adrian Klaver
adrian.klaver@aklaver.com
On 12/19/2014 01:17 AM, Ramesh T wrote:
is their any other method to clone database,other then pgadmin and pgdump..
if is their option pls let me know..
You will need to be more specific about what you want.
Do you want something like what pg_dump offers, a copy of a database at
a point in time?
Do want a replicated database that exists in close to real time,
concurrently?
Or something else?
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 12/20/2014 08:23 PM, Ramesh T wrote:
CCing list.
yeah i have following
1 and 2 answers..not something else only those two answers..
Well there is CREATE DATABASE TEMPLATE some_db.
IMPORTANT look at the caveats at bottom of page here:
http://www.postgresql.org/docs/9.3/interactive/sql-createdatabase.html
For replication in the core see here:
http://www.postgresql.org/docs/9.3/interactive/high-availability.html
For other solutions see Table 25-1 here:
http://www.postgresql.org/docs/9.3/interactive/different-replication-solutions.html
On Fri, Dec 19, 2014 at 8:20 PM, Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:On 12/19/2014 01:17 AM, Ramesh T wrote:
is their any other method to clone database,other then pgadmin
and pgdump..
if is their option pls let me know..You will need to be more specific about what you want.
Do you want something like what pg_dump offers, a copy of a database
at a point in time?Do want a replicated database that exists in close to real time,
concurrently?Or something else?
--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Import Notes
Reply to msg id not found: CAK8Zd=tOQhchWeeu3gtd4J+CvLN=z9rEgHCJBVM2qxpgjU-ELg@mail.gmail.com