pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jon Hassen <jhassen@azstarnet.com>
To: arun kv <arun@library.iisc.ernet.in>
To: PGSQL <pgsql-php@postgresql.org>
Subject: Re: backup postgres database
Date: Wed, 13 Mar 2002 10:46:21 -0700
Message-ID: <l03130303b8b53ef1f49e@[169.197.62.6]> (raw)
In-Reply-To: <Pine.BSO.4.21.0203131936110.25120-100000@library.iisc.ernet.in>

try using the command:

/usr/local/pgsql/bin/pg_dumpall > outputfile

('outputfile' is the name you want for your file) to make a backup of your
database. put that copy where your new site will be. then use the new site
to restore this file as if it belonged there in the first place by using
the command:

/usr/local/pgsql/bin/psql -d template1 -f outputfile

('outputfile' is the name you used in step 1) this restores the file you
created in the first step to the new installation.

that's it. you might have to run initdb, or initlocation on the new
installation's data directory.

Jon Hassen


At 7:42 PM +0530 3/13/02, arun kv wrote:
>hello sir,
>        i have a postgresql database in one system and want to transfer
>the same to another system. i am not finding a way to transfer this
>database from one system to another.if i transfer the file in
>/var/lib/pgsql/libdatabase them it gives error.how shall i transfer
>database.
>  another thing. how to take up backups of the database on the system.
>pls help me as i am new to postgresql
>  thanking you
>    Arun
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster






view thread (11+ messages)  latest in thread

Message-ID: <l03130303b8b53ef1f49e@[169.197.62.6]>
Permalink:  ../l03130303b8b53ef1f49e@%5B169.197.62.6%5D/
Also on:    postgresql.org/message-id/l03130303b8b53ef1f49e@[169.197.62.6]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: jhassen@azstarnet.com, arun@library.iisc.ernet.in
  Subject: Re: backup postgres database
  In-Reply-To: <l03130303b8b53ef1f49e@[169.197.62.6]>
  References: <Pine.BSO.4.21.0203131936110.25120-100000@library.iisc.ernet.in> <l03130303b8b53ef1f49e@[169.197.62.6]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox