Simple, safe hot backup and recovery

From: Yoshinori Sano <yoshinori(dot)sano(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Simple, safe hot backup and recovery
Date: 2009-06-05 07:18:29
Message-ID: 732ec2180906050018n4f2bb5gd6f245acf9fffe1c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, all

I posted this message to the pgsql-general mailing list, however there was
no response. So, I repost the mail to pgsql-hackers.

I want to achieve a simple, safe hot backup and recovery using PostgreSQL 8.3
or later.

The standalone hot backup script listed in "24.3.5.1. Standalone hot backups"
(http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html)
seems to be very helpful to me because it's simple and it matches my needs.
I don't need the timeline feature provided by PITR. However, the recovery
procedure is somewhat complex, as the documentation shows. So, I want to
rely on the PostgreSQL's crush recovery mechanism. Is this a bad idea?

I wrote a prototype script for that reason. The script's first part is based
on the standalone hot backup script taken from the documentation. The last part
is my idea. The archived WAL segment files are stored into the backup's pg_xlog/
and remake the backup file. The script works for me, but I want to know whether
this approach is really safe or not. If it's not safe, I want to know
the reason.

Anybody has good idea? Is there another solution?

Thanks in advance,
--
Yoshinori Sano <yoshinori(dot)sano(at)gmail(dot)com>

Attachment Content-Type Size
hotbackup.sh application/x-sh 738 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2009-06-05 07:19:11 Re: Synchronous replication: status of standby side
Previous Message Markus Wanner 2009-06-05 07:05:14 Re: PostgreSQL Developer meeting minutes up