Re: - Mailing list pgsql-novice

From Crombleholme, Roy
Subject Re:
Date
Msg-id 4F9235D7B7D2D611B8DB000802E65AC5062370@lccmail2.lancscc.gov.uk
Whole thread Raw
In response to  ("Mickey" <mickey@mcnjeni.com>)
List pgsql-novice
>On Wed, 2003-09-10 at 01:28, Mickey wrote:
>> HI,
>>
>> I'm obviously new to this list, but I am also new to postgres as well.. I
am
>> looking for someone who can dumb a database on one server (postgres
7.1.3)
>> and restore it on another server (postgres 7.1.3) some OS on both
machines,
>> should be pretty easy, I just have failed in every attempt.
>
>How did you try to do it, and what error did you get?
>
>(7.1.3 is pretty dated - isn't it time to upgrade?)

Hi Mickey,

This is what I use to do a similar thing.  You need to use pg_dumpall which
should be in the bin folder of your postgresql distribution.

Run this command (I'm assuming the user postgres is your DB superuser) :-

pg_dumpall -U postgres > /tmp/alldata.dmp

This should dump your entire database cluster into one file.  You can then
transfer this file to your other machine for restore which can be done like
this (again, you will find the psql command in the bin folder) :-

psql -U postgres < /tmp/alldata.dmp

You can put the dump into any dir or file I've just used /tmp and
alldata.dmp for no particular reason.

Hope this helps.  :))


Roy Crombleholme
Systems/Software Engineer
ICT Services

--  "Somethings come from nothing, nothing seems to come from somethings" --
SFA - Guerilla


********************
This e-mail contains information intended for the addressee only.
It may be confidential and may be the subject of legal and/or professional privilege.
If you are not the addressee you are not authorised to disseminate, distribute, copy or use this e-mail or any
attachmentto it 
The content may be personal or contain personal opinions and unless specifically stated or followed up in writing, the
contentcannot be taken to form a contract or to be an expression of the County Council's position. 
LCC reserves the right to monitor all incoming and outgoing email
LCC has taken reasonable steps to ensure that outgoing communications do not contain  malicious software and it is your
responsibilityto carry out any checks on this email before accepting the email and opening attachments. 
********************


pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re:
Next
From: Oliver Elphick
Date:
Subject: Re: Which files belong to which database?