Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best PostgreSQL backup script?

0 views
Skip to first unread message

Nico Kadel-Garcia

unread,
Dec 12, 2009, 7:47:29 AM12/12/09
to
I'm dealing with a client's PostgreSQL server setup, and am shocked,
*SHOCKED* to find that it's not being backed up regularly. (Here are
your winnings, sir!) I've primarily worked with MySQL lately, so I'm
being cautious with advice.

A fast look shows many hundreds of posted backup scripts for
PostgreSQL, mostly written by people who can't actually script very
well. Can anyone out here recommend the best of the lot, or one that
they know works well in their environment? The ideal would be:

* Stores passwords in a separate, securable, preferably root owned
file.
* Auto-detects all PostgreSQL databases for backup.
* Backs them up individually. (Backing them all up with pg_dumpall
would be OK in most cases, but sometimes it's not wise.)
* Backs up all the relevant configuration files, as well as the
databases themselves.
* Expire, do not simply overwrite, old backups. logrotate can be used
to move aside old backup files, but overwriting the same backup target
every night is hideously bad practice. So is generating an eternally
growing list of backups with no means of expiration.

Yes, I recognize that I could spend some time debugging and selecting
among such scripts myself, but I thought I'd ask if someone has a
really good one lying around.

0 new messages