pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedMoving Database -> New Disk
3+ messages / 3 participants
[nested] [flat]
* Moving Database -> New Disk
@ 1999-02-13 04:45 Tim Perdue, Directricity.com <tim@directricity.com>
1999-02-14 00:17 ` Re: [SQL] Moving Database -> New Disk Fabrice Scemama <fabrice.scemama@gesnet.net>
0 siblings, 1 reply; 3+ messages in thread
From: Tim Perdue, Directricity.com @ 1999-02-13 04:45 UTC (permalink / raw)
To: pgsql-sql@hub.org
I'm trying to do somethat that shouldn't be so darn difficult - moving a
database to a new bigger disk.
The database is db_domain at /usr/local/pgsq/data/base/db_domain
I want it to reside on /fireball/pgsql/...
I created a dump of db_domain and was able to do initdb on the new
location - but when I try to createdb, of course db_domain is already taken.
If I try to createdb using the -D switch I get an error about it not being
able to find the directory (it's there).
If I don't specify the -D switch, any new database is created under
/usr/local/pgsql/data/base/, even though I restarted postmaster with -D
pointing to /fireball/pgsql/....
So Could someone give some specific instructions on moving db_domain over to
the new hard disk? If there's a FAQ please give a full URL to find it.
Tim
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] Moving Database -> New Disk
1999-02-13 04:45 Moving Database -> New Disk Tim Perdue, Directricity.com <tim@directricity.com>
@ 1999-02-14 00:17 ` Fabrice Scemama <fabrice.scemama@gesnet.net>
0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Scemama @ 1999-02-14 00:17 UTC (permalink / raw)
To: Tim Perdue, Directricity.com <tim@directricity.com>; +Cc: pgsql-sql@hub.org
What about using a symlink ?
mv /usr/local/pgsql /fireball
ln -s /fireball/pgsql /usr/local/pgsql
Should do the whole trick.
Fabrice
"Tim Perdue, Directricity.com" wrote:
>
> I'm trying to do somethat that shouldn't be so darn difficult - moving a
> database to a new bigger disk.
>
> The database is db_domain at /usr/local/pgsq/data/base/db_domain
>
> I want it to reside on /fireball/pgsql/...
>
> I created a dump of db_domain and was able to do initdb on the new
> location - but when I try to createdb, of course db_domain is already taken.
> If I try to createdb using the -D switch I get an error about it not being
> able to find the directory (it's there).
>
> If I don't specify the -D switch, any new database is created under
> /usr/local/pgsql/data/base/, even though I restarted postmaster with -D
> pointing to /fireball/pgsql/....
>
> So Could someone give some specific instructions on moving db_domain over to
> the new hard disk? If there's a FAQ please give a full URL to find it.
>
> Tim
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Moving Database -> New Disk
@ 1999-02-14 18:38 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 1999-02-14 18:38 UTC (permalink / raw)
To: tim@directricity.com; +Cc: pgsql-sql@hub.org
"Tim Perdue, Directricity.com" <tim@directricity.com> writes:
> I'm trying to do somethat that shouldn't be so darn difficult - moving a
> database to a new bigger disk.
> The database is db_domain at /usr/local/pgsq/data/base/db_domain
> I want it to reside on /fireball/pgsql/...
> I created a dump of db_domain and was able to do initdb on the new
> location - but when I try to createdb, of course db_domain is already taken.
It sounds like createdb is connecting to your old postmaster.
> If I try to createdb using the -D switch I get an error about it not being
> able to find the directory (it's there).
createdb's -D is a weird critter that does not have at all the same
meaning as -D in the postmaster. You're still connecting to the same
Postgres installation, you are just telling the system to put the
subdirectory for the particular database in a nonstandard place rather
than under installation-data-directory/base/.
Your message is actually not very clear about whether you want to move
the entire Postgres installation (all of /usr/local/pgsql/data/) or
just the one database (/usr/local/pgsql/data/base/db_domain/). Either
is possible.
> If I don't specify the -D switch, any new database is created under
> /usr/local/pgsql/data/base/, even though I restarted postmaster with -D
> pointing to /fireball/pgsql/....
Hmm, sure sounds like the postmaster's -D didn't "take". You might want
to double check that you gave it correctly. Alternatively, rebuild your
Postgres software with the correct data directory specified at configure
time (I know this works, not sure whether -D really works or not...)
Someone else's suggestion of a symlink would also work.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-02-14 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-02-13 04:45 Moving Database -> New Disk Tim Perdue, Directricity.com <tim@directricity.com>
1999-02-14 00:17 ` Fabrice Scemama <fabrice.scemama@gesnet.net>
1999-02-14 18:38 Re: Moving Database -> New Disk Tom Lane <tgl@sss.pgh.pa.us>
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