Re: Incremental backup with RSYNC or something?

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Incremental backup with RSYNC or something?
Date: 2011-11-13 14:01:58
Message-ID: CAD2md3HmdhgyF8-Rq-hJZGeLxCuPxXmsF3nM-kh=8yZ+tZ6ENw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 13, 2011 7:39 PM, "Phoenix Kiula"
>
> Question: what can I do to rsync only the new additions in every table
> starting 00:00:01 until 23:59:59 for each day?

You can't really. You can rsync the whole thing and it can be faster, but
you can't really just copy the last changes as a diff.

That's because Pg writes all over the data files, it doesn't just append.
There isn't any 'last changed timestamp' on records, and even if there were
Pg would have no way to know which records to delete in the replication
target.

If you want differential backups you'll need to use a row based replication
system like slony or bucardo.

It'd be nice if Pg offered easier differential backups, but at this point
there isn't really anything.

> Searching google leads to complex things like "incremental WAL" and
> whatnot, or talks of stuff like pgcluster. I'm hoping there's a more
> straightforward core solution without additional software or PHD
> degrees.

Nothing really basic. You'll need to use PITR (WAL shipping), streaming
replication or a row level replication solution.
>
> Many thanks for any ideas!
> PK
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2011-11-13 14:45:51 Re: Incremental backup with RSYNC or something?
Previous Message Gregg Jaskiewicz 2011-11-13 13:51:31 Re: Incremental backup with RSYNC or something?