Re: a few questions on backup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marco Colombo <pgsql(at)esiway(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: a few questions on backup
Date: 2007-05-14 15:11:14
Message-ID: 11871.1179155474@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marco Colombo <pgsql(at)esiway(dot)net> writes:
> Am I right in assuming that the following procedure is ok?

> 1) issue pg_start_backup();
> 2) copy (or tar or cpio) the data dir, w/o pg_xlog/
> 3) issue pg_stop_backup();
> 4) copy (or tar or cpio) pg_xlog/ contents.

No. You have to have an actual archive_command script copying the WAL
segments somewhere else when told to. An asynchronous copy of the xlog
directory will be nothing but garbage, because we recycle WAL segments
as fast as we can (ie, as soon as the archive_command claims to have
saved the data).

1) 2) and 3) are OK, but you need to use archive_command to collect the
xlog segments.

Actually ... given your low requirements, I wonder why you don't just
stop the postmaster, tar the datadir, start the postmaster.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Dorbath 2007-05-14 15:36:47 Re: a few questions on backup
Previous Message Marco Colombo 2007-05-14 14:54:40 a few questions on backup