Thread:

From
"Mickey"
Date:
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.

Thanks in advance for anything that could be offered,

Mickey


Re:

From
Aarni Ruuhimäki
Date:

----------  Forwarded Message  ----------

Subject: Re: [NOVICE]
Date: Wed, 10 Sep 2003 12:27:27 +0300
From: Aarni Ruuhimäki <aarni.ruuhimaki@kymi.com>
To: "Mickey" <mickey@mcnjeni.com>

Hi,

From command line:

pg_dump -c your_db > your_db_dump

Then move the file to the other machine and command

psql your_db < your_db_dumb

or

cat your_db_dumb | psql your_db

Please see the online docs for more dump options.

BR,

Aarni

On Wednesday 10 September 2003 03:28, you 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.
>
> Thanks in advance for anything that could be offered,
>
> Mickey
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Aarni Ruuhimäki
Megative Tmi
KYMI.com

Pääsintie 26
45100 Kouvola
FINLAND

info@kymi.com / aarni.ruuhimaki@kymi.com

+358-5-3755 035 / +358-50-4910 037
------------------------------------------------
Linux RedHat / KDE



Re:

From
Oliver Elphick
Date:
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?)

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Draw near to God and he will draw near to you.
      Cleanse your hands, you sinners; and purify your
      hearts, you double minded."       James 4:8


Re:

From
"Crombleholme, Roy"
Date:
>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. 
********************