From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org
To: a f <just1coder@yahoo.ca>
Subject: Re: Restore a backup to a different disk?
Date: Thu, 22 Jul 2010 15:48:33 -0500
Message-ID: <4C4868510200002500033B87@gw.wicourts.gov> (raw)
In-Reply-To: <248984.75183.qm@web65402.mail.ac4.yahoo.com>
References: <263251.56844.qm@web65412.mail.ac4.yahoo.com>
<4C48311B0200002500033B27@gw.wicourts.gov>
<240044.87213.qm@web65408.mail.ac4.yahoo.com>
<4C484E9E0200002500033B56@gw.wicourts.gov>
<248984.75183.qm@web65402.mail.ac4.yahoo.com>
a f <just1coder@yahoo.ca> wrote:
>>> but #1 was focused on backing up MyDatabase that resides on
>>> /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata.
>
>> Do you already have the backup you want to restore? If so, how
>> was it made, exactly?
>
>
> Yes.
> I used pg_dump to make the backup.
Well, if you made it without specifying any non-default options
you're not telling me about, you should initdb on the new drive (if
you haven't already), create any roles you had in the old database
which you want in the new one, create the database with the name you
want it to have, and run psql against that database using the file
created by pg_dump.
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, just1coder@yahoo.ca
Subject: Re: Restore a backup to a different disk?
In-Reply-To: <4C4868510200002500033B87@gw.wicourts.gov>
References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> <4C48311B0200002500033B27@gw.wicourts.gov> <240044.87213.qm@web65408.mail.ac4.yahoo.com> <4C484E9E0200002500033B56@gw.wicourts.gov> <248984.75183.qm@web65402.mail.ac4.yahoo.com> <4C4868510200002500033B87@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox