Re: Backup Database Question - Mailing list pgsql-general

From John R Pierce
Subject Re: Backup Database Question
Date
Msg-id 4E8DFDA5.3030506@hogranch.com
Whole thread Raw
In response to Re: Backup Database Question  (Carlos Mennens <carlos.mennens@gmail.com>)
Responses Re: Backup Database Question  (Carlos Mennens <carlos.mennens@gmail.com>)
List pgsql-general
On 10/06/11 8:26 AM, Carlos Mennens wrote:
> Yes I agree but I didn't know enough about PostgreSQL to make that
> determination. Seems very logical however. Does anyone know of a
> PostgreSQL backup script floating around the Internet for Linux
> systems? I found a great one for MySQL but sadly that doesn't do me
> any good.


    /path/to/pg_dumpall | gzip > /path/to/pgbackup-$(date -I).sql.gz

put this in a script accessible by the postgres user, and in the
postgres user's crontab, invoke it something like..

30 1 * * * /path/to/backupscript

to run it every night at 1:30am.  If you only want to run it once a week...

30 1 * * 6 /path/to/backupscript

which will run it on Saturday morning at 1:30am (day 6)


--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


pgsql-general by date:

Previous
From: Carlos Mennens
Date:
Subject: Tuning Variables For PostgreSQL
Next
From: Carlos Mennens
Date:
Subject: Re: Backup Database Question