Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 64330632F21 for ; Sat, 20 Feb 2010 13:53:49 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 37637-06 for ; Sat, 20 Feb 2010 17:53:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mail.postgresql.org (Postfix) with ESMTP id 8EC69633750 for ; Sat, 20 Feb 2010 13:53:38 -0400 (AST) Received: by ey-out-2122.google.com with SMTP id 25so228952eya.33 for ; Sat, 20 Feb 2010 09:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=KfsK/rc4kD0br/IEA0naIjou53yWtlHhAGrMhM2eYwA=; b=Ck7c7esOg7abWVH225WCCt/gbvGLhBoHg+RSKr836Go0HG3uqp3yP2nwDpQvys8fbp GbOP6vXGy6jXCvNkEQFsZaOpDtF0p1ToiP/0gCS2CoboWNuW4lIV8wHgaetV5qVwu/qK r4iqZgivI39o5xYAewlHJ4pgBKygwyqCuOBWs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XcW45H6pSKPFXULJJKym1eIPnye2XMdDc5f2D/zEVbGqBNkQ/GwKi7LtegDKwR8ivX kdAIF95iORhqxFJYWYH0ZtDUlQ4NmJp4C8x7FcyJwIHb96EX/MHKUjJ3RsuK4B1znzEW Ht1YQYJZSpzBATmQ+QylHebx7WKsJereplRnU= MIME-Version: 1.0 Received: by 10.216.173.140 with SMTP id v12mr1607543wel.60.1266688417382; Sat, 20 Feb 2010 09:53:37 -0800 (PST) In-Reply-To: <4B8017C0.8070101@itech7.com> References: <4B8017C0.8070101@itech7.com> Date: Sat, 20 Feb 2010 10:53:37 -0700 Message-ID: Subject: Re: Backups From: Scott Marlowe To: Nilesh Govindarajan Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.668 tagged_above=-10 required=5 tests=AWL=-0.558, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 201002/155 X-Sequence-Number: 33758 On Sat, Feb 20, 2010 at 10:11 AM, Nilesh Govindarajan wrote: > I want a script to backup all databases table by table in different .sql > files. Why? It may be that pg_dump / pg_restore already provide the functionality you are looking for. > How to do this ? pg_dump -t tablename dbname rinse repeat > Also since it is a script, there has to be some role having read access to > all tables on all databases. How to grant that ? Can they just be a superuser? Or can you grant them the role that has ownership of the tables?