missymadi
asked on
What are the steps to move an existing data directory in Postgres9?
Experts,
I have an existing database located on /loc/data. I want to move the data directory to it's own partition. What are the steps to accomplish this task? I have tried numerous configurations such as stopping the db, moving the db to /data then exporting PGDATA to /data. The server will not connect thorugh PGADMIN.
How do I get PGADMIN to see the PGDATA files? What are all of the config files if any that need to be changed? Do I need to run initdb? I did try this and recieved an error that there was data in the directory. Do I need to initdb then move the data over?
Please advise, Missymadi
I have an existing database located on /loc/data. I want to move the data directory to it's own partition. What are the steps to accomplish this task? I have tried numerous configurations such as stopping the db, moving the db to /data then exporting PGDATA to /data. The server will not connect thorugh PGADMIN.
How do I get PGADMIN to see the PGDATA files? What are all of the config files if any that need to be changed? Do I need to run initdb? I did try this and recieved an error that there was data in the directory. Do I need to initdb then move the data over?
Please advise, Missymadi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Here is what I tried to do:
su abc
pg_ctl stop
exit
su (to root)
mv /opt/co/DATA/* /data
exit
su abc
pg_ctl start
PGADMIN connection refused. There is nothing in the log!!
I don't know where else to look to solve this.
Thanks, Missymadi
su abc
pg_ctl stop
exit
su (to root)
mv /opt/co/DATA/* /data
exit
su abc
pg_ctl start
PGADMIN connection refused. There is nothing in the log!!
I don't know where else to look to solve this.
Thanks, Missymadi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i gave the experts credit for helping me. I think initially the problem was a permissions issue. Then I found that I could do a symlink that was less complicated. The database restarted after many tests.
ASKER