Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm looking for a way to automate backing up multiple PostgreSQL clusters.

Any thoughts/hints before I do the following?

I've already found the autopostgresqlbackup package. Which is a functional shell script that does basic pg_dumpall (including basic rolling of the pg_dumpall output files) against one, configured cluster. I was about to "bend" it to allow me to specify a command line argument for a configuration file, and then write a wrapper shell script to do them sequentially, but I wanted to ask for input first.

share|improve this question
Rather than a simple pg_dumpall I recommend a pg_dumpall --globals-only, then pg_dump -Fc -f dbname.pgdump dbname for each database. Also, take a look at PgBarman for managing PITR backup. –  Craig Ringer Mar 22 '14 at 12:39
On this postgresql wiki page there is a highly configurable shell script for automated backup of a cluster. You can run it one instance per cluster. –  hmayag Mar 23 '14 at 22:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.