From owner-freebsd-ports Tue Nov 5 17:20:12 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4B0337B407 for ; Tue, 5 Nov 2002 17:20:03 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F67543E4A for ; Tue, 5 Nov 2002 17:20:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gA61K2x3090180 for ; Tue, 5 Nov 2002 17:20:02 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gA61K2Y2090179; Tue, 5 Nov 2002 17:20:02 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95ACD37B401; Tue, 5 Nov 2002 17:10:13 -0800 (PST) Received: from smtp1.chello.se (smtp1.chello.se [193.150.195.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 532E343E6E; Tue, 5 Nov 2002 17:10:12 -0800 (PST) (envelope-from girgen@smtp.chello.se) Received: from palle.girgensohn.se ([213.89.136.93]) by smtp1.chello.se (InterMail vK.4.04.00.00 201-232-137 license 1626c9846e046e5eb21c6bb450d1abc1) with ESMTP id <20021106010902.QSOE6991.smtp1@palle.girgensohn.se>; Wed, 6 Nov 2002 02:09:02 +0100 Received: from palle.girgensohn.se (localhost [127.0.0.1]) by palle.girgensohn.se (8.12.6/8.12.6) with ESMTP id gA61A4jW084509; Wed, 6 Nov 2002 02:10:04 +0100 (CET) (envelope-from girgen@palle.girgensohn.se) Received: (from girgen@localhost) by palle.girgensohn.se (8.12.6/8.12.6/Submit) id gA61A4Of084508; Wed, 6 Nov 2002 02:10:04 +0100 (CET) (envelope-from girgen) Message-Id: <200211060110.gA61A4Of084508@palle.girgensohn.se> Date: Wed, 6 Nov 2002 02:10:04 +0100 (CET) From: Palle Girgensohn Reply-To: Palle Girgensohn To: FreeBSD-gnats-submit@FreeBSD.org Cc: Nick Sayer X-Send-Pr-Version: 3.113 Subject: ports/44983: postgresql periodic file update Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44983 >Category: ports >Synopsis: postgresql periodic file update >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Nov 05 17:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Palle Girgensohn >Release: FreeBSD 4.7-RELEASE i386 >Organization: PING PONG >Environment: System: FreeBSD palle.girgensohn.se 4.7-RC FreeBSD 4.7-RC #0: Sun Sep 29 17:21:22 CEST 2002 root@palle.girgensohn.se:/usr/local/obj/usr/src/sys/STORDATAN i386 >Description: - Thanks to Nick Sayer for pointing out that a pg_dumpall -g is needed to backup users information. - pg_dump does not use the `-d dbname' syntax... >How-To-Repeat: >Fix: Index: 502.pgsql =================================================================== RCS file: /home/ncvs/ports/databases/postgresql7/files/502.pgsql,v retrieving revision 1.3 diff -u -r1.3 502.pgsql --- 502.pgsql 26 Aug 2002 08:12:40 -0000 1.3 +++ 502.pgsql 6 Nov 2002 00:44:34 -0000 @@ -53,10 +53,12 @@ umask 077 dbnames=`psql -q -t -A -d template1 -c "SELECT datname FROM pg_database WHERE datname != 'template0'"` rc=$? +file=${PGBACKUPDIR}/pgglobals_`date "+%Y%m%d"` +pg_dumpall -g | gzip -9 > ${file}.gz for db in ${dbnames}; do echo -n " $db" file=${PGBACKUPDIR}/pgdump_${db}_`date "+%Y%m%d"` - pg_dump ${PGDUMP_ARGS} -d $db -f ${file} + pg_dump ${PGDUMP_ARGS} -f ${file} $db [ $? -gt 0 ] && rc=3 done >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message