Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 2139A6335ED for ; Tue, 6 Apr 2010 03:26:36 -0300 (ADT) 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 59878-03 for ; Tue, 6 Apr 2010 06:26:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rs47.luxsci.com (rs47.luxsci.com [65.61.166.88]) by mail.postgresql.org (Postfix) with ESMTP id B90EE63357D for ; Tue, 6 Apr 2010 03:26:23 -0300 (ADT) Received: from gnanam (ABTS-TN-Static-186.58.165.122.airtelbroadband.in [122.165.58.186] (may be forged)) (authenticated bits=0) by rs47.luxsci.com (8.13.1/8.13.7) with ESMTP id o366QEO2002618; Tue, 6 Apr 2010 01:26:18 -0500 Reply-To: From: "Gnanakumar" To: "'Kevin Grittner'" , References: <009e01cad22e$a3121400$e9363c00$@com> <4BB5AD0C0200002500030365@gw.wicourts.gov> In-Reply-To: <4BB5AD0C0200002500030365@gw.wicourts.gov> Subject: Re: Database clone stuck in the middle Date: Tue, 6 Apr 2010 11:56:08 +0530 Organization: Zoniac Software Private Limited Message-ID: <00b201cad552$0f8af540$2ea0dfc0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcrSac8DaGN0n+wMR5KCbMTZ2/o2qQC6A60Q Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.952 tagged_above=-10 required=5 tests=AWL=0.158, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 201004/32 X-Sequence-Number: 34126 Thank you very much for sharing this "nohup" command. That's really helpful. -----Original Message----- From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov] Sent: Friday, April 02, 2010 7:09 PM To: pgsql-admin@postgresql.org; gnanam@zoniac.com Subject: Re: [ADMIN] Database clone stuck in the middle "Gnanakumar" wrote: > I connect to our database which is hosted remotely using PuTTY > thro SSH protocol. > my Internet got disconnected in the middle, > so database cloning was also stuck in the middle. > 4. Considering this Internet disconnection problem, what is the > safest way to clone a database using CREATE DATABASE WITH TEMPLATE > command, so that this will not happen in the future? You putty to the server and run psql from a shell on the database server? If so, try putting the word "nohup" in front of "psql" -- that tells the program to keep running even if the connection is lost. (It is short for "no hangup", I believe.) On the other questions, I suspect that you'd be OK to delete the partial database, as long as it doesn't show up in pg_database. A command which doesn't run to completion is always *supposed* to leave the database cluster in a good state. It never hurts to make sure you've got a good backup before trying anything unusual, however. -Kevin