Re: Need solution for weekly database "snapshot" - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: Need solution for weekly database "snapshot"
Date
Msg-id 20130422192736.GH3958@hermes.hilbert.loc
Whole thread Raw
In response to Re: Need solution for weekly database "snapshot"  (Moshe Jacobson <moshe@neadwerx.com>)
List pgsql-general
On Mon, Apr 22, 2013 at 03:16:19PM -0400, Moshe Jacobson wrote:

> > > Not bad, but the transaction logs would fill up the file system.
> >
> > I'm not sure I understand that comment.  Why would the transaction logs be
> > particularly voluminous in this case?
> >
>
> I assumed the logs would be shipping to the slave and accumulating if the
> replication stopped. Is that not the case?

That IS the case but you wouldn't do that. You would only
create the slave as needed, say, Saturday night or whatever
is practical, then let it catch up.

THEN on Sunday at noon you detach the slave and *create your
backup from the detached slave* (which does not affect your
main DB). That backup can be used to restore into a static
"snapshot" database. Then you can remove the slave (or let
it replicate until next week).

> We don't have enough disk space to create a whole new copy
> of the database cluster.

The slave can sit on another machine.

Size or Speed. Pick either.

Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


pgsql-general by date:

Previous
From: Moshe Jacobson
Date:
Subject: Re: Need solution for weekly database "snapshot"
Next
From: akp geek
Date:
Subject: pg_restore from split files