Re: question about Postgresql and rsync - Mailing list pgsql-general

From Steve Crawford
Subject Re: question about Postgresql and rsync
Date
Msg-id 200511030743.20820.scrawford@pinpointresearch.com
Whole thread Raw
In response to question about Postgresql and rsync  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Responses Re: question about Postgresql and rsync
List pgsql-general
On Thursday 03 November 2005 07:28, 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, if the system is shut down you should be able to do a filesystem
copy. But I'm confused why this is supposedly better than using the
tools provided (pg_dump, pg_dumpall, pg_restore, psql...).

Also, unless this is a read-only server, keeping the DR machine
up-to-date will require you to stop your server whenever you want to
update your DR machine.

You can do a filesystem backup on a live machine and bring it
up-to-date on a second machine using the log files. You can even keep
shipping the log files to the backup server in order to keep it
up-to-date which seems like a better solution (and you could use
rsync to move the log files if you so desire). Check out 22.3 in the
manual for info on on-line backup and recovery:
http://www.postgresql.org/docs/8.0/interactive/backup-online.html

You may want to use rsync to keep your configuration files up-to-date.

Cheers,
Steve

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: question about Postgresql and rsync
Next
From: Tony Caduto
Date:
Subject: Remotely reload server config?