Re: Working with one live and one development database

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Working with one live and one development database
Дата
Msg-id 1165338938.14565.447.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Working with one live and one development database  (hugo.wetterberg@gmail.com)
Список pgsql-general
On Tue, 2006-12-05 at 04:59, hugo.wetterberg@gmail.com wrote:
> Hi all,
> We are moving from MySQL to PgSQL in my organization and I would like
> some input on what the best method is for working with one development
> and one live database. We need to copy all data, structure information,
> functions et.c. from the live database to the development database
> every now and then. The development database will be on a separate
> machine. What is the best way to do this?

I do this quite often for testing purposes.  If the dbs are on different
machines, then, from a place that can connect to both machines,
something like:

// if the slave_server db exists:
dropdb -h slave_server -U superuser dbname
createdb -h slave_server -U superuser dbname
pg_dump -h master_server -U superuser dbname | psql -h slave_server -U
superuser dbname

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

Предыдущее
От: "Raymond O'Donnell"
Дата:
Сообщение: Re: Working with one live and one development database
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Restore database from files (not dump files)?