PITR WAL backups

From: Mark Reidenbach <m(dot)reidenbach(at)everytruckjob(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: PITR WAL backups
Date: 2005-02-02 18:55:47
Message-ID: 42012233.40700@everytruckjob.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-02-03 06:10:14 Re: client authentication problem
Previous Message Darcy Buskermolen 2005-02-02 16:58:50 Re: PostgreSQL Multiple Vulnerabilities