Re: windows and pg 8.2 (change database to another server)

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Terry Yapt <yapt(at)technovell(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: windows and pg 8.2 (change database to another server)
Date: 2007-10-01 10:32:47
Message-ID: 20071001103247.GD387@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Sep 30, 2007 at 11:36:23PM +0200, Terry Yapt wrote:
> Hello all,
>
> I would like to change a pg database to another server.
>
> The source environment is: postgresql Windows v.8.2.4 (windows xp
> workstation).
> The target environment is: postgresql Windows v.8.2.5 (windows 2003 Server).
>
> I would like to do migration without pg_dumpall and I think I can do the
> migration process _only_ copying this (after stop Postgresql service, of
> course):
> 1.- Data directory (c:\program files\postgresql\8.2\data).
> 2.- Another TableSpace folders/directories.
>
> But after copy that folders to my new server, service PostgreSQL doesn't
> start with a 'cannot create postmaster.pid'.
>
> First of all. I think this method is admisible. Isn't it ?

It is.

> And second question: I think my problem is that some rights are wrong
> after copying data folder. What are the right rights to apply to data
> folder ?

Yes, most likely. You need to grant the postgres service account "Change"
permissions (or Full Control, but Change is recommended) on the data
directory. If you didn't do anything speicifically, it will just have
inherited from further up in the tree, which means that the service account
only has "Read" access.

//Magnus

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Naz Gassiep 2007-10-01 10:56:12 Query problem
Previous Message Richard Huxton 2007-10-01 10:12:20 Re: ERROR: invalid byte sequence from psql - Works perfectly from pgAdmin III query window