Re: Incremental / Level -1 backup in PG

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Incremental / Level -1 backup in PG
Date: 2017-03-22 00:35:39
Message-ID: 8490f853-b5f0-5787-a367-2a9caae792ff@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/21/2017 5:27 PM, Rakesh Kumar wrote:
> PG does not have a concept of incremental backup. The way it works in Oracle and other RDBMS is that incremental backup only backups up changed blocks since the last full backup. So if only 10% of blocks changed since the last full backup, incremental backup will be only for 10%.
> I am wondering whether it is technically feasible to implement it like this:
>
> 1 - At the time of full backup, note the last modified time of each data file in a repository.
> 2 - Next time when incremental backup runs, for every data file it will check the last modified time of it with the one in the repository to determine whether it has changed since last full backup. If yes, back it up.
>
> Now on to restore:
>
> 1 - First restore full backup.
> 2 - Restore incremental backup.
>
> My question: Will it work in PG?

basebackup + WAL archive lets you do just exactly this. you can
restore to any transaction between when that basebackup was taken, and
the latest entry in the WAL archive, its referred in the documentation
as PITR, Point in Time Recovery.

--
john r pierce, recycling bits in santa cruz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2017-03-22 00:36:52 Re: Incremental / Level -1 backup in PG
Previous Message Adrian Klaver 2017-03-22 00:35:32 Re: Incremental / Level -1 backup in PG