Re: Migrating database (7.1.3 - 7.2.1)

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Migrating database (7.1.3 - 7.2.1)
Дата
Msg-id 20020725143520.V29680@mail.libertyrms.com
обсуждение исходный текст
Ответ на Migrating database (7.1.3 - 7.2.1)  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Список pgsql-general
On Thu, Jul 25, 2002 at 01:32:17PM -0400, Johnson, Shaunn wrote:
>
> * Stop the database
> * pg_dump the entire database

You can't do this.  You can only do pg_dump while postgres is
running.

If you have enough disk space to double your use, then you don't have
to save the pg_dump file: you could run two back ends (one on port
5432, the other on, say, 5234) and just do

    pg_dump -p 5432 [your 7.1 db] | psql -p 5234 [your 7.2 db]

That _should_ work (it's worked so far for me).

If that won't work for you, pipe your pg_dump output through gzip.
Then, stop the database, tar up the data directory (using your
compressor of choice, if you like), and download that to another
location for safekeeping.  Check it twice to make sure it works!  Now
(here's the scary bit) delete the old tree, create a new tree, and
run the pg_dump output file back into the new (7.2) tree.  This way,
if something terrible happens, you can just re-upload your tarball,
untar it in place, and start up like you never tried the upgrade.

A

--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


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

Предыдущее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: Error while dropping a table
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Error while dropping a table