Re: copy/backup database

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: copy/backup database
Дата
Msg-id m366e0pibv.fsf@belphigor.mcnaught.org
обсуждение исходный текст
Ответ на copy/backup database  ("Dan" <dan@NOSPAMbluecap.co.uk>)
Список pgsql-general
"Dan" <dan@NOSPAMbluecap.co.uk> writes:

> Hello,
>
> I have a pgsql database I want to make a copy of to do some test work on it.
> In /var/lib/psql/data/base I have made a copy of this directory with correct
> file permission etc but when I try to access the database it says it's not
> in the catalogue.  I guess there's obviously a procudure for this or a pgsql
> command but I dont know what.

Don't do it that way.

$ pg_dump original_db > dump.out
$ createdb test_db
$ psql -f dump.out test_db

-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time...          --Dylan

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

Предыдущее
От: Jonathan Bartlett
Дата:
Сообщение: Re: Oracle news article
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: [SQL] ORDER BY what?