Re: Automating Backup & Restor

From: "Mikko Partio" <mpartio(at)gmail(dot)com>
To: smiley2211 <smiley2211(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Automating Backup & Restor
Date: 2007-10-24 17:20:23
Message-ID: 2ca799770710241020t57c01508p7ee36a218b28f215@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/24/07, smiley2211 <smiley2211(at)yahoo(dot)com> wrote:
>
>
> Hello all,
>
> Does someone have a script that backups a database from one server and
> restores it to another server??? I am NEW to Postgresql so I am starting
> from scratch...
>
> so, in essence - what I want to do is (I CURRENTLY DO THIS MANUALLY):
>
> Server1 (IS IT POSSIBLE TO DUMP DIRECTLY TO SERVER2??)

pg_dump > filename.dmp
> scp filename.dmp to SERVER2
>
> Server2
> psql -d mydb -f filename.dmp
> vacuum
> reindex

server1$ pg_dump mydb | psql -h server2 -d mydb

Regards

M

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-10-24 17:59:10 Re: 8.3b1 in production?
Previous Message Erik Jones 2007-10-24 15:41:05 Re: google