pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: manuel antonio ochoa <manuel8aalfaro@gmail.com>
To: postgres list <pgsql-sql@postgresql.org>
Subject: Re: check files .backup
Date: Thu, 27 Jan 2011 08:11:08 +0800
Message-ID: <4D40B81C.2030600@postnewspapers.com.au> (raw)
In-Reply-To: <AANLkTin14r=Hsht1BDASHpJRZ6BrMj9Qk16Nco_b2M_R@mail.gmail.com>
References: <AANLkTikd3Z_kyXDDX1AZ6J-J179o5+DN5o9g79tXEzFQ@mail.gmail.com>
	<4D3E635D.9060309@postnewspapers.com.au>
	<AANLkTin14r=Hsht1BDASHpJRZ6BrMj9Qk16Nco_b2M_R@mail.gmail.com>

On 01/25/2011 11:14 PM, manuel antonio ochoa wrote:
> I would like it complete and not truncated? That it hasn't been modified
> since being
> originally written?

OK. First, check the exit code from pg_backup so you detect any 
failures. The exit code is reported by the shell on UNIX systems in the 
$? variable, but you can usually just do something like the following 
(untested):

if ! pg_backup .... ; then
   logger -p crit "pg_backup failed"
   mail -s "Pg backup failed" someone@yourcompany <<__END__
   The latest backup failed. Check the logs for why, and
   fix it!
__END__
fi



Second: after writing the backup, calculate an md5sum or (preferably) 
digitally sign the backup using gpg. An md5sum is only really protection 
against corruption unless you store it somewhere separate and secure. I 
prefer to digitally sign my backups with detached gpg signatures.

--
Craig Ringer



view thread (4+ messages)

Message-ID: <4D40B81C.2030600@postnewspapers.com.au>
Permalink:  ../4D40B81C.2030600@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4D40B81C.2030600@postnewspapers.com.au

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: craig@postnewspapers.com.au, manuel8aalfaro@gmail.com
  Subject: Re: check files .backup
  In-Reply-To: <4D40B81C.2030600@postnewspapers.com.au>

* 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