X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 99F4F9FA5C8 for ; Thu, 1 Jun 2006 13:30:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 29505-10 for ; Thu, 1 Jun 2006 13:30:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 1E50C9FA040 for ; Thu, 1 Jun 2006 13:30:46 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Thu, 1 Jun 2006 16:30:45 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 01 Jun 2006 11:30:44 -0500 Subject: Re: Postgres Backup Questions From: Scott Marlowe To: "John R. Allgood" Cc: pgsql-admin@postgresql.org In-Reply-To: <447F049E.2000408@turbocorp.com> References: <447F049E.2000408@turbocorp.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1149179444.25526.139.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 01 Jun 2006 11:30:44 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/4 X-Sequence-Number: 21966 On Thu, 2006-06-01 at 10:15, John R. Allgood wrote: > Hello > > I have a question regarding backups on Postgresql 7.4.7-2. We are > currently using a Progress database and will be moving over to Postgres > this month. In Progress there is a way to verify your backups does > Postgres have anything similiar or is there other ways to accompplish > this. I am currently writing backup and other utility scripts and would > like to incorporate this into my program. I wrapped my backup in a bash script, and that seems to catch errors. something like: if !( /data01/pg/bin/pg_dump dbname > dbname.sql ); then cat "backup failed"|mail -s "backup failed" yourname@yourdomain.com; fi To test this, I corrupted a table in a test database to force a hard failure, and it sent an email. Don't know if it's a comprehensive test, but it seems to work for us.