Re: how to detect the backup database every day
От | brian |
---|---|
Тема | Re: how to detect the backup database every day |
Дата | |
Msg-id | 46B88630.80700@zijn-digital.com обсуждение исходный текст |
Ответ на | Re: how to detect the backup database every day (Richard Huxton <dev@archonet.com>) |
Список | pgsql-general |
Richard Huxton wrote: > son@raider.co.nz wrote: > >> Hello all >> >> I use a crontab job to backup and restore my database every midnight >> every >> day (using pg_dump and restore...) >> >> My cron job run well for a while. However, today I discovered that my >> database was not restored for one month. >> >> I also fix the problem as there is corruption in the script. >> >> My question is how I can detect whether the backup or restore >> processes is >> corrupted. I donot want that my backup database is one month old -:( > > > Well, if the script failed with an error, cron should have sent you an > email (or the user the script runs as, anyway). > To expand on that, have a look at your crontab and ensure that the call to your script does not end with ">/dev/null 2>&1". That will cause the script to run silently, regardess of any errors. If you want it to be silent yet have errors emailed to you, change it to ">/dev/null" (without the quotes). If the emails have been sent but this is an account on a remote server you might want to investigate having the emails for that remote account sent to your regular email address. brian
В списке pgsql-general по дате отправления: