Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Oct 2004 16:37:49 -0500
From:      "Andrew L. Gould" <algould@datawok.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Postgres
Message-ID:  <200410131637.49385.algould@datawok.com>
In-Reply-To: <416D9C1D.1000104@indatacorp.com>
References:  <416D4546.9090308@webminded.nl> <20041013204735.GO9309@lb.tenfour> <416D9C1D.1000104@indatacorp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 13 October 2004 04:20 pm, Randy Grafton wrote:
> Dick Davies wrote:
> >* Norman Uittenbogaart <norman@webminded.nl> [1010 16:10]:
> >>I'm trying to write a backup script for postgres and us a crontab
> >> on it. In the manual it says for pg_dumpall make $HOME/.pgpass so
> >> it won't ask for a password.
> >>Now I made the .pgpass in root's homedir (i wanted to use root's
> >>crontab) paste the password in it, chmod 400 it ...
> >
> >Can't you just pgdump from the local socket? And not bother with the
> > password thing at all?
>
> I chose to go with the pg_dump solution command from root's crontab.
> Cron runs a script once a night with the following commands:
> DATE=`/bin/date +%Y%m%d`
> /usr/local/bin/vacuumdb -a -F -v -U pgsql >
> /var/backups/"$DATE"_pg.vac /usr/local/bin/pg_dump -Fc -U pgsql
> db_name > /var/backups/"$DATE"_db.bu
>
> -Randy

Why not run use pgsql's crontab?

Best of luck,

Andrew Gould



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410131637.49385.algould>