From: Mark Reidenbach <m.reidenbach@everytruckjob.com>
To: pgsql-admin@postgresql.org
Subject: PITR WAL backups
Date: Wed, 02 Feb 2005 12:55:47 -0600
Message-ID: <42012233.40700@everytruckjob.com> (raw)
The PITR documentation recommends that a user's archive command should
not overwrite an existing wal archive file, but it appears you need at
least the wal archive file that matches the .backup marker for the
recovery process to succeed. This makes sense because the recovery
process needs to replay what happened during the time it took to make
the backup. The problem I'm having is that you need to backup this wal
file before it's been archived to have a backup which is consistent, but
the documentation also states you need to make sure not to overwrite
existing files in your archive command.
Is the solution to copy this wal file to a directory other than the
archive directory and make sure it's part of the base backup. If you
run a cron job to save the current wal file every minute or so, should
this file also be copied to a different directory than the archive
directory to prevent the check for existing files from failing? Is this
how other people have their systems set up?
If this is correct, maybe the documentation should mention a separate
directory should be used for the wal file that matches the .backup file
and for the files copied by cron jobs so that checks for existing files
won't find the partially wal files and fail to overwrite them. It might
also state you need to copy the wal file matching the .backup marker to
the archive directory if it wasn't archived through the system's archive
command and that the file copied by the cron job also needs to be copied
to your archive directory before running recovery.
Is any of this correct or am I messing up the procedure entirely?
Thanks,
Mark Reidenbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: m.reidenbach@everytruckjob.com
Subject: Re: PITR WAL backups
In-Reply-To: <42012233.40700@everytruckjob.com>
References: <42012233.40700@everytruckjob.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox