Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E9A349FB1C4 for ; Sat, 3 Feb 2007 05:34:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 96763-03 for ; Sat, 3 Feb 2007 05:34:53 -0400 (AST) X-Greylist: delayed 00:10:48.47558 by SQLgrey-1.7.4 Received: from mail-ihug.icp-qv1-irony5.iinet.net.au (ihug-mail.icp-qv1-irony5.iinet.net.au [203.59.1.199]) by postgresql.org (Postfix) with ESMTP id 034049FB232 for ; Sat, 3 Feb 2007 05:34:52 -0400 (AST) Received: from unknown (HELO [192.168.1.253]) ([203.214.33.122]) by mail-ihug.icp-qv1-irony5.iinet.net.au with ESMTP; 03 Feb 2007 17:23:57 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAMriw0XL1iF6VGdsb2JhbAANjksBkUsBAQEB X-IronPort-AV: i="4.13,276,1167580800"; d="scan'208"; a="1071358137:sNHT19899264" Subject: Re: Backup Strategies? From: Phillip Smith To: pgsql-admin@postgresql.org Content-Type: text/plain Date: Sat, 03 Feb 2007 20:28:48 +1100 Message-Id: <1170494928.9214.10.camel@phillips-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/68 X-Sequence-Number: 24533 Have you looked at pg_dump and/or pg_dumpall? That would be the more common way of performing backups. I run 2 backup's nightly of our databases: 1) As part of a backup script, call pg_dumpall as the postgres *nix users and PG user, then pipe the output to a file on a remote server. 2) As a cronjob: pg_dumpall > /dev/st0 Cheers, -p On Sat, 2007-02-03 at 01:51 -0500, Joshua Kramer wrote: > Hello All, > > What strategies are people using for automated, script-based backup of > databases? There are a few I can think of: > > 1. Create a "db_backup" unix user and a "db_backup" pgsql user. Grant > READ access to all objects on all databases for the "db_backup" pgsql > user. Create a .pgpass file in the home directory of the "db_backup" unix > user. Backup as needed with a script run as the "db_backup" unix user. > > 2. Create a "db_backup" unix user and repeat above, except using the > "postgres" db user. > > Thanks, > -Josh > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster >