X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9694A5391A for ; Sat, 30 Apr 2005 13:27:46 -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 67664-03 for ; Sat, 30 Apr 2005 16:27:41 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id B32D552A62 for ; Sat, 30 Apr 2005 13:27:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3UGRaCv002082; Sat, 30 Apr 2005 12:27:36 -0400 (EDT) To: Mauri Sahlberg Cc: pgsql-admin@postgresql.org Subject: Re: Backing up users? In-reply-to: <42733EFB.2010908@claymountain.com> References: <42733EFB.2010908@claymountain.com> Comments: In-reply-to Mauri Sahlberg message dated "Sat, 30 Apr 2005 11:16:59 +0300" Date: Sat, 30 Apr 2005 12:27:36 -0400 Message-ID: <2081.1114878456@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/416 X-Sequence-Number: 17429 Mauri Sahlberg writes: > What if I just wish to move a single database with it's users to a new > machine? It would be a disaster to overwrite whole existing system > catalog on the target machine. Users (and groups) are global across each Postgres installation. So what you'd need to do is something like this: pg_dump the desired database, and do "pg_dumpall -g" to get a script recreating all your users and groups. Edit out the non-pertinent part of that script. Run the users/groups script and then the pg_dump script on the target machine. regards, tom lane