X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 438DD9DC9D9; Mon, 30 Jan 2006 19:55:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06515-03; Mon, 30 Jan 2006 19:55:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 7771C9DC9C1; Mon, 30 Jan 2006 19:55:08 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 621913983D; Mon, 30 Jan 2006 17:55:11 -0600 (CST) Date: Mon, 30 Jan 2006 17:55:11 -0600 From: "Jim C. Nasby" To: "Uwe C. Schroeder" Cc: pgsql-admin@postgresql.org, Krzysztof Szadkowski , pgsql-admin-owner@postgresql.org Subject: Re: Copy database Message-ID: <20060130235511.GN3920@pervasive.com> References: <000001c61ff9$f6eb2080$1401a8c0@eldipsrv> <200601291931.29829.uwe@oss4u.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601291931.29829.uwe@oss4u.com> X-Operating-System: FreeBSD 6.0-RELEASE amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.099 required=5 tests=[AWL=0.099] X-Spam-Score: 0.099 X-Spam-Level: X-Archive-Number: 200601/323 X-Sequence-Number: 20411 createdb --template=sourcedatabase newdatabase will also work (and probably work faster) if you can kick everyone out of sourcedatabase and you're doing all this on one machine. On Sun, Jan 29, 2006 at 07:31:29PM -0800, Uwe C. Schroeder wrote: > pg_dump -h sourcehost -U sourceuser sourcedatabase | psql -h desthost -U > destuser destdatabase > > you may have to add a parameter for the password depending on your pg_hba.conf > settings. Both databases need to be network enabled and have a pg_hba.conf > entry for the machine you're running this command on. > > > > On Monday 23 January 2006 00:49, Krzysztof Szadkowski wrote: > > Hi all, > > > > I am looking for a way to copy whole database to another existing > > database. > > Any suggestions ? > > > > --------------------------------------------- > > Best regards, > > Krzysztof Szadkowski > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 9: In versions below 8.0, the planner will ignore your desire to > > choose an index scan if your joining column's datatypes do not > > match > > -- > UC > > -- > Open Source Solutions 4U, LLC 1618 Kelly St > Phone: +1 707 568 3056 Santa Rosa, CA 95401 > Cell: +1 650 302 2405 United States > Fax: +1 707 568 6416 > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461