Re: Incremental backup with RSYNC or something? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Incremental backup with RSYNC or something?
Date
Msg-id CAD2md3HmdhgyF8-Rq-hJZGeLxCuPxXmsF3nM-kh=8yZ+tZ6ENw@mail.gmail.com
Whole thread Raw
In response to Incremental backup with RSYNC or something?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Responses Re: Incremental backup with RSYNC or something?  (Scott Marlowe <scott.marlowe@gmail.com>)
List 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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Gregg Jaskiewicz
Date:
Subject: Re: Incremental backup with RSYNC or something?
Next
From: Andy Colson
Date:
Subject: Re: Incremental backup with RSYNC or something?