Date: Wed, 6 Nov 2002 02:10:04 +0100 (CET) From: Palle Girgensohn <girgen@pingpong.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Nick Sayer <nsayer@FreeBSD.org> Subject: ports/44983: postgresql periodic file update Message-ID: <200211060110.gA61A4Of084508@palle.girgensohn.se>
next in thread | raw e-mail | index | archive | help
>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 <girgen@pingpong.net> >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211060110.gA61A4Of084508>