Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

From: EllyR <ela_macky(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)
Date: 2012-05-03 18:55:47
Message-ID: 1336071347751-5684058.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a huge Postgres database on my C drive, I am continuously collecting
the data, so unfortunately, the drive is getting full and I wanted to move
it to a map network drive I got. I followed the instruction in the link
below:

http://kb.vircom.com/kbase/default.asp?id=1512&Lang=1&SID=

1 - Stop the Postgres and Modus Monitor services
TIP: save a step & stop both services directly from Administrative Tools >
Services panel on your Windows server

2 - Copy C:\Program Files\PostgreSQL\data\*.* to the destination directory
(ex. D:\pgdata\)

3 - Open the Registry Editor

4 - Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\pgsql-8.0

- Modify ImagePath:

From: C:\Program Files\PostgreSQL\bin\pg_ctl.exe" runservice -N "pgsql-8.0"
-D "C:\Program Files\PostgreSQL\data\"

To: C:\Program Files\PostgreSQL\bin\pg_ctl.exe" runservice -N "pgsql-8.0" -D
"d:\pgdata\" (where d:\pgdata = your new PostgreSQL directory)

5 - Go to HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installatio ns

- Look for and open the alpha-numeric subfolder

- Modify Data Directory:

From: C:\Program Files\PostgreSQL\data\

To: D:\pgdata\ (where d:\pgdata = your new PostgreSQL directory)

6 - Go to HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\pg sql-8.0

- Modify Data Directory:

From: C:\Program Files\PostgreSQL\data\

To: D:\pgdata\ (where d:\pgdata = your new PostgreSQL directory)

IMPORTANT: By default, Modus installs PostgreSQL to run under a user called
Postgres. The data directory requires proper permissions in order to allow
the service to have access.

7 - Open Windows Explorer

- Go to the new PostgreSQL data directory in Windows Explorer
- Right-click and select Properties
- Click on the Security
- Click on Add to add the Postgres user
- Give the Postgres user the permission to Modify the directory

8 - Start the PostgreSQL and Modus Monitor services from the Administrative
Tools > Services panel on your server

But after doing all the things mentioned in the link, when I want to start
the postgres again as a service, it can not be started, it seems it does not
recognize the map network drive , would you please let me know if I am in
the right track or I need to do something else? any help is appreciated.
Thanks.

Elly.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Move-the-postgreSQL-database-from-Drive-C-to-Map-Network-Drive-Called-Z-tp5684058.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2012-05-03 21:12:40 Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)
Previous Message Josh Kupershmidt 2012-05-03 18:54:07 Re: privs drop after alter table