Re: Question about PITR backup

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-admin(at)postgresql(dot)org>,"sgm" <sgm277(at)yahoo(dot)com(dot)cn>
Subject: Re: Question about PITR backup
Date: 2012-06-08 18:20:11
Message-ID: 4FD1FC0B020000250004821F@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

sgm <sgm277(at)yahoo(dot)com(dot)cn> wrote:

> I have a question about PITR backup in a single server, the method
> is make a base backup, and backup the WAL archive log(eg, every
> day at 11:30 pm). But if the OS' harddisk is broken(eg,14:00
> pm),the system can't start, we have to recover the database on a
> another server using the base backup and the WAL backup,so in this
> case suppose that we only can restore the database to yesterday's
> 11:30 pm state, am I right?

You can't recover to a point past your last available WAL record.

> I want to backup the pg_xlog folder every minute by crontab but my
> concern is that the data inconsistent, because the lastest log in
> pg_xlog is being updated all the time, am I right? Any
> suggestions?

Use streaming replication? Or at the very least, set a short
archive_timeout value and copy from the archive target location
frequently.

-Kevin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Josh Kupershmidt 2012-06-08 19:06:23 Re: How To Change Password Hash Algorithm From MD5 to SHA-256
Previous Message Tom Lane 2012-06-08 13:59:14 Re: Creating a Read Only profile in 8.4