Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id ED2F32E3E76 for ; Wed, 9 Jan 2008 23:07:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 19286-07 for ; Wed, 9 Jan 2008 23:07:38 -0400 (AST) Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 65AF12E3E6D for ; Wed, 9 Jan 2008 23:07:44 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id m0A37iZ02550; Wed, 9 Jan 2008 22:07:44 -0500 (EST) From: Bruce Momjian Message-Id: <200801100307.m0A37iZ02550@momjian.us> Subject: Re: pg_dumpall --exclude In-Reply-To: To: Richard Ray Date: Wed, 9 Jan 2008 22:07:44 -0500 (EST) CC: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/96 X-Sequence-Number: 27870 Richard Ray wrote: > I've inherited an application that creates a temp schema and stores > a table for each user there. > The data is temporary and does not need to be backed up. > I run pg_dumpall each night. > I can't just delete the tables because users may be working during the > backup. > Any suggestion on how to exclude the temp schema? You don't say what version of Postgres you are using but 8.2 added this feature: * Allow complex selection of objects to be included or excluded by pg_dump (Greg Sabino Mullane) pg_dump now supports multiple -n (schema) and -t (table) options, and adds -N and -T options to exclude objects. Also, the arguments of these switches can now be wild-card expressions rather than single object names, for example -t 'foo*', and a schema can be part of a -t or -T switch, for example -t schema1.table1. -- Bruce Momjian http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +