pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRestore a backup to a different disk?
7+ messages / 3 participants
[nested] [flat]
* Restore a backup to a different disk?
@ 2010-07-22 13:41 a f <just1coder@yahoo.ca>
0 siblings, 1 reply; 7+ messages in thread
From: a f @ 2010-07-22 13:41 UTC (permalink / raw)
To: pgsql-admin
Good day all,
I am fairly new with PQSQL and am slowly picking things up - I have added a new
disk and would like to do two things:
1. Restore a backup to this new disk - /hda2/pgdata/
2. Move a database from /hda1/pgdata to /hda2/pgdata/
Any help is most appreciated, thank you.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Restore a backup to a different disk?
@ 2010-07-22 16:52 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: a f <just1coder@yahoo.ca>
0 siblings, 1 reply; 7+ messages in thread
From: Kevin Grittner @ 2010-07-22 16:52 UTC (permalink / raw)
To: pgsql-admin; a f <just1coder@yahoo.ca>
a f <just1coder@yahoo.ca> wrote:
> I have added a new disk and would like to do two things:
>
> 1. Restore a backup to this new disk - /hda2/pgdata/
> 2. Move a database from /hda1/pgdata to /hda2/pgdata/
First I want to be clear about whether you want to restore and move
entire database *clusters*, or whether you want to deal with
individual databases within a cluster. A cluster is the level at
which you start and stop the server process, and it can contain many
databases
-Kevin
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Restore a backup to a different disk?
@ 2010-07-22 17:17 a f <just1coder@yahoo.ca>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 7+ messages in thread
From: a f @ 2010-07-22 17:17 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-admin
No cluster here, it is just a stand alone db server. Sorry if I sent this to the
wrong UG.
I have #2 down already; but #1 was focused on backing up MyDatabase that resides
on /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata.
________________________________
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org; a f <just1coder@yahoo.ca>
Sent: Thu, July 22, 2010 12:52:59 PM
Subject: Re: [ADMIN] Restore a backup to a different disk?
a f <just1coder@yahoo.ca> wrote:
> I have added a new disk and would like to do two things:
>
> 1. Restore a backup to this new disk - /hda2/pgdata/
> 2. Move a database from /hda1/pgdata to /hda2/pgdata/
First I want to be clear about whether you want to restore and move
entire database *clusters*, or whether you want to deal with
individual databases within a cluster. A cluster is the level at
which you start and stop the server process, and it can contain many
databases
-Kevin
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Restore a backup to a different disk?
@ 2010-07-22 18:58 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: a f <just1coder@yahoo.ca>
0 siblings, 1 reply; 7+ messages in thread
From: Kevin Grittner @ 2010-07-22 18:58 UTC (permalink / raw)
To: pgsql-admin; a f <just1coder@yahoo.ca>
a f <just1coder@yahoo.ca> wrote:
> No cluster here, it is just a stand alone db server.
There's some terminology you've apparently not grasped yet -- when
PostgreSQL is running, the instance of the server is referred to as
a "cluster". If you're running a PostgreSQL database server, you
are running a cluster, in the terminology of the PostgreSQL world.
Within the cluster you normally have a template0 database, a
template1 database, a postgres database, and one or more application
databases.
> Sorry if I sent this to the wrong UG.
Posting to this list is fine for this question. pgsql-general or
pgsql-novice would also be OK, but having posted here, don't post on
another list unless the thread here goes dormant for at least a
couple days.
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
> I have #2 down already;
So you moved a PostgreSQL cluster from one mount point to another?
How, exactly, did you do that?
> 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?
-Kevin
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Restore a backup to a different disk?
@ 2010-07-22 19:18 a f <just1coder@yahoo.ca>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 7+ messages in thread
From: a f @ 2010-07-22 19:18 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-admin
>> 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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Restore a backup to a different disk?
@ 2010-07-22 20:48 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: a f <just1coder@yahoo.ca>
0 siblings, 1 reply; 7+ messages in thread
From: Kevin Grittner @ 2010-07-22 20:48 UTC (permalink / raw)
To: pgsql-admin; a f <just1coder@yahoo.ca>
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Restore a backup to a different disk?
@ 2010-07-23 06:16 Andreas Schmitz <mailinglist@longimanus.net>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Schmitz @ 2010-07-23 06:16 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin@postgresql.org, a f <just1coder@yahoo.ca>
Reading this thread confuses me a little bit. There is no need to backup
a cluster in order to move it to another disk within the same machine.
Stopping the Database, moving $PGDATA, adjusting scripts and routines if
nessecary and firing up the whole thing would do fine.
regards
-Andreas
On 07/22/2010 10:48 PM, Kevin Grittner wrote:
> 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
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2010-07-23 06:16 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 13:41 Restore a backup to a different disk? a f <just1coder@yahoo.ca>
2010-07-22 16:52 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-22 17:17 ` a f <just1coder@yahoo.ca>
2010-07-22 18:58 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-22 19:18 ` a f <just1coder@yahoo.ca>
2010-07-22 20:48 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-23 06:16 ` Andreas Schmitz <mailinglist@longimanus.net>
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