Re: question about Postgresql and rsync

From: Andrew Rawnsley <ronz(at)investoranalytics(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: question about Postgresql and rsync
Date: 2005-11-03 16:01:07
Message-ID: BF8F9E73.F3D7%ronz@investoranalytics.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


You're better off doing a live backup with the PITR mechanism. That way its
not a trick (assuming you're running 8.0+). If you are archiving logs, do

select pg_start_backup(<label>);
(do rsync,tar,cp -r,whatever)
select pg_stop_backup();

Do an archive recovery with any saved logs, add 2 eggs, stir, and bake at
350 for 10 minutes. Instant hot backup.

I haven't figured out a microwave recipe yet...metal computer cases and what
not...:-)

On 11/3/05 10:39 AM, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

> Tony Caduto wrote:
>> Hi,
>> Does anyone know if it would be safe to use rsync to mirror a Postgresql
>> setup to a backup server?
>>
>> I need to create a exact duplicate for a disaster recovery server, the
>> disaster recovery server would not be in use until the production one
>> went down for
>> some reason.
>>
>> It seems to me that if the postmaster is stopped it should be safe.
>> Comments?
>
> Yes, it is safe if the postmaster is down. In fact our documention
> recommends a trick of doing rsync while the postmaster is running, then
> shutting down the postmaster just long enough to do another rsync to get
> the changes into the backup.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Cristian Prieto 2005-11-03 16:01:30 Save prepared plan...
Previous Message Richard_D_Levine 2005-11-03 16:00:20 Re: OT It is here: Oracle 10g Express