From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How do I set up automatic backups? |
Date: | 2008-07-29 23:18:39 |
Message-ID: | dcc563d10807291618j5cecc0e2se10c71e15932393b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 29, 2008 at 2:24 PM, Rob Richardson
<Rob(dot)Richardson(at)rad-con(dot)com> wrote:
> Greetings again!
>
> A few days ago, I visited a customer's site to talk about administering
> our system, which is developed around a PostGres database. One of the
> topics was how to back up the database. I described the process of
> using PgAdmin to back up and restore a database, and I said a backup
> should be done every night. I was asked how to automate the procedure,
> and I couldn't answer. A database administrator said, "There's got to
> be a way. Otherwise, PostGres wouldn't have survived". I agree with
> him. The only answers I've found on the Internet involve creating a
> password-less account and using that to run pg_dump. What is the
> official best way to automatically back up a PostGres database?
For future reference, you'll get less scattered ansewrs if you tell us
what OS you're running on, specifically whether or not it's unix or
windows. In unix you can write a handy dandy bash shell script like
this:
#!/bin/bash
if (! (pg_dump dbname > /dir/filename.sql)); then
echo "Backup failed"|sendmail -s "admin alert" "myname(at)mydomain";
fi;
or something like that to run as a crontab job.
From | Date | Subject | |
---|---|---|---|
Next Message | Klint Gore | 2008-07-29 23:51:01 | Re: Cursor |
Previous Message | Christophe | 2008-07-29 22:46:55 | Re: Cursor |