Re: A question on PSQL 8.3 setup

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: A question on PSQL 8.3 setup
Дата
Msg-id 20090723133807.GZ5407@samason.me.uk
обсуждение исходный текст
Ответ на A question on PSQL 8.3 setup  (Jong Chun Park <joumon@gmail.com>)
Ответы Re: A question on PSQL 8.3 setup
Список pgsql-general
On Thu, Jul 23, 2009 at 01:08:26AM -0600, Jong Chun Park wrote:
> I need to configure PSQL to store all DB-related data into
> /home/pgsql/data instead of somewhere in / such as /var/lib/
> postgresql/8.3/... or /usr/local/pgsql/data.

Assuming you're using the standard builds in Ubuntu, I'd probably do
something like:

1) make your directory if you haven't got one already:
  mkdir /home/postgres
  chown postgres:postgres /home/postgres

2) shut down postgres
  /etc/init.d/postgres-8.3 stop

3) copy the existing database cluster over to its new location
  cp -a /var/lib/postgresql/8.3 /home/postgres

4) move the old cluster out of the way for safe keeping and put a
   symlink back in place
  mv /var/lib/postgresql/8.3 /var/lib/postgresql/8.3-old
  ln -s /home/postgres/8.3 /var/lib/postgresql/8.3

5) start PG again
  /etc/init.d/postgres-8.3 start

if that all works then you've got the option of dumping the old data
that was stashed away above and update the config file to point straight
to the new location.

--
  Sam  http://samason.me.uk/

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: comparing NEW and OLD (any good this way?)
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: problem with pg_restore?