From owner-freebsd-questions@FreeBSD.ORG Wed Oct 13 21:37:37 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BC0E16A4CE for ; Wed, 13 Oct 2004 21:37:37 +0000 (GMT) Received: from mynah.mail.pas.earthlink.net (mynah.mail.pas.earthlink.net [207.217.120.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CD7043D60 for ; Wed, 13 Oct 2004 21:37:37 +0000 (GMT) (envelope-from algould@datawok.com) Received: from 31-21.lctv-ubr2-blk1.cablelynx.com ([206.255.31.21] helo=yoda.datawok.com) by mynah.mail.pas.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 4.34) id 1CHqoT-0007K9-BU for freebsd-questions@freebsd.org; Wed, 13 Oct 2004 14:37:37 -0700 From: "Andrew L. Gould" To: freebsd-questions@freebsd.org Date: Wed, 13 Oct 2004 16:37:49 -0500 User-Agent: KMail/1.6.2 References: <416D4546.9090308@webminded.nl> <20041013204735.GO9309@lb.tenfour> <416D9C1D.1000104@indatacorp.com> In-Reply-To: <416D9C1D.1000104@indatacorp.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410131637.49385.algould@datawok.com> X-ELNK-Trace: ee791d459e3d6817d780f4a490ca69564776905774d2ac4b2485d528373d1e80f2ae58783ad47d14350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 206.255.31.21 Subject: Re: Postgres X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2004 21:37:37 -0000 On Wednesday 13 October 2004 04:20 pm, Randy Grafton wrote: > Dick Davies wrote: > >* Norman Uittenbogaart [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