X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C5DA6DAC75 for ; Thu, 27 Oct 2005 18:43:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52040-01 for ; Thu, 27 Oct 2005 21:43:05 +0000 (GMT) Received: from netbox.unitech.com.ar (unknown [200.32.92.34]) by svr1.postgresql.org (Postfix) with ESMTP id D7508DAB06 for ; Thu, 27 Oct 2005 18:43:05 -0300 (ADT) Received: from dariop (dariop.unitech.com.ar [192.168.1.237]) by netbox.unitech.com.ar (8.11.6/8.11.6) with ESMTP id j9RLrgF26637 for ; Thu, 27 Oct 2005 18:53:42 -0300 Received: from 127.0.0.1 (AVG SMTP 7.1.361 [267.12.5/149]); Thu, 27 Oct 2005 18:45:36 -0300 From: "Dario" To: Subject: Re: excluding a table from pg_dump Date: Thu, 27 Oct 2005 18:45:36 -0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <874q75sdg8.fsf@srv.protecting.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.042 required=5 tests=[AWL=0.042] X-Spam-Score: 0.042 X-Spam-Level: X-Archive-Number: 200510/283 X-Sequence-Number: 19355 May be... you could dump your schema in plain format, (dump only schema), create a new database, restore schema, and then do something like psql -c "select \'pg_dump --table=\'||name||\'--disable-triggers database_\' from pg_class where (condition that filters system tables)">dumper.sh (I'm not sure about escaping (or lack of) in quotes and pipes...) your file will be full of: pg_dump --table=table1 --disable-triggers database_ pg_dump --table=table2 --disable-triggers database_ then you could edit that file and delete the large table dump. run the script to a generate your dump and filter for undesired things. then run the file with psql. When things go wrong, start all over. This only is usefull if you need to do it in a periodically basis. Otherwise I assume it will be easier to do it by hand. I never did it in postgresql. I will try to make it work and give you more detail about the necesary steps, but only the next wednesday. May be someone could complete (or refute this idea) (My english is definitly bad) greetings. long life and beer. -----Mensaje original----- De: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]En nombre de Harald Fuchs Enviado el: martes, 25 de octubre de 2005 14:40 Para: pgsql-admin@postgresql.org Asunto: Re: [ADMIN] excluding a table from pg_dump In article <60zmoxblq0.fsf@dba2.int.libertyrms.com>, Chris Browne writes: > A usual reason why I would want to dump everything except for a few > tables is that those few tables are particularly enormous and > particularly useless (at least, for the purposes of my dump). > In that case, the LAST thing I want to do is to make extra copies of > the *useless* tables. As long as we don't have "pg_dump -X" (or something like that) you could put the tables you don't want to dump into another schema. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq