Thread: exporting postgre data

exporting postgre data

From
User Map
Date:
is it posible to transfer data from postgres of one computer to the postgres in another computer. In SQL server this is easily done by the export utility of the sql server.


Never miss a thing. Make Yahoo your homepage.

Re: exporting postgre data

From
"Gevik Babakhani"
Date:
Check out the docs for pg_dump utility.


From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of User Map
Sent: Friday, January 25, 2008 10:18 AM
To: pgsql
Subject: [GENERAL] exporting postgre data

is it posible to transfer data from postgres of one computer to the postgres in another computer. In SQL server this is easily done by the export utility of the sql server.


Never miss a thing. Make Yahoo your homepage.

Re: exporting postgre data

From
johnf
Date:
On Friday 25 January 2008 02:56:12 am Gevik Babakhani wrote:
> Check out the docs for pg_dump utility.
> http://www.postgresql.org/docs/8.3/static/app-pgdump.html
>
>
>   _____
>
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of User Map
> Sent: Friday, January 25, 2008 10:18 AM
> To: pgsql
> Subject: [GENERAL] exporting postgre data
>
>
> is it posible to transfer data from postgres of one computer to the
> postgres in another computer. In SQL server this is easily done by the
> export utility of the sql server.
>
>
>
>   _____
>
> Never miss a thing. Make Yahoo
> <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> your
> homepage.

But how do you backup only a single table or transfer only a signle table.

--
John Fabiani

Re: exporting postgre data

From
"Harald Armin Massa"
Date:
JohnF,

> But how do you backup only a single table or transfer only a signle table.

please use pg_dump. You can find excellent documentation at

http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html

please pay special attention to the --table option.

Best wishes,

Harald


--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
fx 01212-5-13695179
-
EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!

Re: exporting postgre data

From
Bill Moran
Date:
> > From: pgsql-general-owner@postgresql.org
> > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of User Map
> > Sent: Friday, January 25, 2008 10:18 AM
> > To: pgsql
> > Subject: [GENERAL] exporting postgre data
> >
> >
> > is it posible to transfer data from postgres of one computer to the
> > postgres in another computer. In SQL server this is easily done by the
> > export utility of the sql server.
> >
>
> But how do you backup only a single table or transfer only a signle table.

MSSQL has a fancy GUI "wizard".

It basically does all the stuff pg_dump does, but just using a GUI
interface to manage all the options.  I guess it has the addition
of managing the interaction between pg_dump on one server an pg_restore
on another as well.

Doesn't really have any more features that I'm aware of, just has a
nice "one stop" interface.

--
Bill Moran
http://www.potentialtech.com

Re: exporting postgre data

From
"Harald Armin Massa"
Date:
Bill,

pgadmin3 provides the same: just dig down to the table, use the backup
link and give the options. It also calls pg_dump just with the right
parameters, you can copy that command for a .cmd for professional
automatic backup.

Best wishes,

Harald

> MSSQL has a fancy GUI "wizard".
>
> It basically does all the stuff pg_dump does, but just using a GUI
> interface to manage all the options.  I guess it has the addition
> of managing the interaction between pg_dump on one server an pg_restore
> on another as well.
>
> Doesn't really have any more features that I'm aware of, just has a
> nice "one stop" interface.
>
> --
> Bill Moran
> http://www.potentialtech.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>



--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
fx 01212-5-13695179
-
EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!

Re: exporting postgre data

From
Ivan Sergio Borgonovo
Date:
On Fri, 25 Jan 2008 10:02:41 -0500
Bill Moran <wmoran@potentialtech.com> wrote:

> > > From: pgsql-general-owner@postgresql.org
> > > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of User
> > > Map Sent: Friday, January 25, 2008 10:18 AM
> > > To: pgsql
> > > Subject: [GENERAL] exporting postgre data
> > >
> > >
> > > is it posible to transfer data from postgres of one computer to
> > > the postgres in another computer. In SQL server this is easily
> > > done by the export utility of the sql server.
> > >
> >
> > But how do you backup only a single table or transfer only a
> > signle table.
>
> MSSQL has a fancy GUI "wizard".

bcp does not provide the full set of goodiness but it works on the
command line. I don't think it is suited for backup... just for
exporting.

It doesn't make too much sense working on the command line on Windows
(unless you work with monad and such... but still) since the shell is
quite limited up to my knowledge. But *nix guys may feel more
comfortable with bcp.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


Re: exporting postgre data

From
johnf
Date:
On Friday 25 January 2008 07:21:34 am Harald Armin Massa wrote:
> Bill,
>
> pgadmin3 provides the same: just dig down to the table, use the backup
> link and give the options. It also calls pg_dump just with the right
> parameters, you can copy that command for a .cmd for professional
> automatic backup.
>
> Best wishes,
>
> Harald
>
> > MSSQL has a fancy GUI "wizard".
> >
> > It basically does all the stuff pg_dump does, but just using a GUI
> > interface to manage all the options.  I guess it has the addition
> > of managing the interaction between pg_dump on one server an pg_restore
> > on another as well.
> >
> > Doesn't really have any more features that I'm aware of, just has a
> > nice "one stop" interface.
> >
> > --
> > Bill Moran
> > http://www.potentialtech.com
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: explain analyze is your friend

The issue I have with pgAdmin3 and backing up a table is with the restore.
The associated sequences are not restored.  Granted that might be a different
problem.  But from a users perspective I see it as a major problem.

--
John Fabiani

Re: exporting postgre data

From
Raymond O'Donnell
Date:
On 25/01/2008 16:51, johnf wrote:

> The issue I have with pgAdmin3 and backing up a table is with the restore.
> The associated sequences are not restored.  Granted that might be a different
> problem.  But from a users perspective I see it as a major problem.

Oh? Works fine for me, on PG 8.2.5 - pg_dump exports the SQL to recreate
the sequence, and a setval() to reset it to where it was.

Ray.


---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------