Re: check files .backup

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: check files .backup
Дата
Msg-id 4D40B81C.2030600@postnewspapers.com.au
обсуждение исходный текст
Ответ на check files .backup  (manuel antonio ochoa <manuel8aalfaro@gmail.com>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: manuel antonio ochoa
Дата:
Сообщение: Compare the resulta of a count sql into bash
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: Compare the resulta of a count sql into bash