From: | "Gnanakumar" <gnanam(at)zoniac(dot)com> |
---|---|
To: | "'Kevin Grittner'" <Kevin(dot)Grittner(at)wicourts(dot)gov>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Database clone stuck in the middle |
Date: | 2010-04-06 06:26:08 |
Message-ID: | 00b201cad552$0f8af540$2ea0dfc0$@com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thank you very much for sharing this "nohup" command. That's really
helpful.
-----Original Message-----
From: Kevin Grittner [mailto:Kevin(dot)Grittner(at)wicourts(dot)gov]
Sent: Friday, April 02, 2010 7:09 PM
To: pgsql-admin(at)postgresql(dot)org; gnanam(at)zoniac(dot)com
Subject: Re: [ADMIN] Database clone stuck in the middle
"Gnanakumar" <gnanam(at)zoniac(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Gnanakumar | 2010-04-06 06:26:34 | Re: Database clone stuck in the middle |
Previous Message | Joe Conway | 2010-04-05 22:50:12 | Re: Database level encryption |