I moved postgresql's data directory by following the following steps:
- Stop postgres
- cp -a source_data_directory destination_data_directory
- export PGDATA=destination_data_directory
- Changing data directory to destination_data_directory within postgresql.conf
- pg_ctl start
But when I run: "pg_ctl start" I get the following error. Can someone please help me figure out the error.
server starting postgres@Server:/usr/lib/postgresql/9.1/bin$ postgres cannot access the server configuration file "/home/destination_data_directory/postgresql.conf": No such file or directory