Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 827052E00F1 for ; Fri, 22 Feb 2008 04:39:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 45877-02 for ; Fri, 22 Feb 2008 04:39:18 -0400 (AST) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by postgresql.org (Postfix) with ESMTP id C6B7C2E005B for ; Fri, 22 Feb 2008 04:39:21 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id r21so301848wxc.28 for ; Fri, 22 Feb 2008 00:39:21 -0800 (PST) Received: by 10.70.54.2 with SMTP id c2mr1770111wxa.85.1203669560959; Fri, 22 Feb 2008 00:39:20 -0800 (PST) Received: by 10.70.95.13 with HTTP; Fri, 22 Feb 2008 00:39:20 -0800 (PST) Message-ID: Date: Fri, 22 Feb 2008 11:39:20 +0300 From: "Vladimir Rusinov" To: pgsql-admin@postgresql.org Subject: by-table dumps & restore MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6087_16837469.1203669560961" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200802/269 X-Sequence-Number: 28343 ------=_Part_6087_16837469.1203669560961 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! We have a pretty large db (10 G and ~ 100 tables). Sometimes (when somebody deleted something usefull from table) it is necessary to restore only one or two tables from backup. I've set up daily full database backup (pg_dump -U ) and per-table backups (pg_dump -U -t ). The question is about constrains & foreign keys. It's clear that restoring only one table to yesturday's state may break some foreign keys. Do I need to do some extra things to make restore successfully? Postgres 8.1.x -- Vladimir Rusinov Voronezh, Russia UNIX Admin @ Murano Software ------=_Part_6087_16837469.1203669560961 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello!

We have a pretty large db (10 G and ~ 100 tables). Sometimes (when somebody deleted something usefull from table) it is necessary to restore only one or two tables from backup.
I've set up daily full database backup (pg_dump -U <user> <db>) and per-table backups (pg_dump -U <user> -t <table> <db>).

The question is about constrains & foreign keys.
It's clear that restoring only one table to yesturday's state may break some foreign keys. Do I need to do some extra things to make restore successfully?

Postgres 8.1.x

--
Vladimir Rusinov
Voronezh, Russia
UNIX Admin @ Murano Software ------=_Part_6087_16837469.1203669560961--