Re: pg_dump, pg_restore and tablespaces

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Colton Smith <smith(at)skio(dot)peachnet(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump, pg_restore and tablespaces
Date: 2005-12-06 20:11:23
Message-ID: 20051206201123.GF16053@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Nov 29, 2005 at 02:35:12PM -0500, Colton Smith wrote:
> Hi:
>
> Let's say I have a database comprised of tables scattered over several
> tablespaces. Suppose I need to move the database to another server and
> I can't
> use the same pathnames for the tablespaces. Am I out of luck when it
> comes to using pg_dump and pg_restore?

No. You can just create the tablespaces you need with whatever mapping
suits the new server before doing the restore. This will generate an
error during the restore (tablespace already exists), but you can ignore
that. Just make sure the names match up.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2005-12-06 20:29:20 Re: Database testing.
Previous Message Dan The Man 2005-12-06 19:50:26 8.1.0 - PITR - cp: cannot stat