Re: PgBackRest question?

From: David Steele <david(at)pgmasters(dot)net>
To: chiru r <chirupg(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: PgBackRest question?
Date: 2017-12-16 12:19:59
Message-ID: e252cb30-9707-3801-f688-75dd2cde4819@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/15/17 4:36 PM, chiru r wrote:
>
> Thanks,I am thinking about a specific recovery case.
>
> Lets assume Heavy transactional system we configured.
> It is generating WAL 2000/hr and recycling automatically in pg_wal
> directory. 
>
> QA :
>
> Sunday -- 11 PM  -- Full backup done.
> Monday -- 11 PM  -- Differential Backup done
> Tuesday-- 10 AM incremental backup is done
> Note :  Every  2 hrs  incremental backup scheduled on system.
>
> For example, if we want to restore to DEV server:
>
> We want to recover database as of 11:30 AM Tuesday on DEV server using
> QA backups.
>
> Is it possible to restore using pgbackrest tool for this scenario?.

Yes. See the documentation here on how to create a standby:

http://pgbackrest.org/user-guide.html#replication/hot-standby

And to recover to a specific point in time:

http://pgbackrest.org/user-guide.html#pitr

Then simply promote the standby and you have a dev server.

> How pgbackrest keeps track of transactions since the last backup? Where
> it stores transaction information for recovery ?.

The transactions since the last backup are tracked in the WAL. Here's
how to setup WAL archiving:

http://pgbackrest.org/user-guide.html#quickstart/configure-archiving

It looks like you have a lot of WAL volume so you'll want to use async
archiving:

http://pgbackrest.org/user-guide.html#backup-host/async-archiving

You mentioned in your original post:

> We are looking for an option, Can we store online backups and wal archive
> files separately in different directories?.

But it's not clear to me why you would need to do that based on your use
case.

Regards,
--
-David
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alessandro Aste 2017-12-16 12:40:54 RE: pgstattuple free_percent to high
Previous Message Corey Taylor 2017-12-16 09:03:04 How to see index was rejected for seq scan?