Re: Scripting a new db server setup

Поиск
Список
Период
Сортировка
От bpalmer
Тема Re: Scripting a new db server setup
Дата
Msg-id Pine.BSO.4.58.0401041122540.1679@psidion.crimelabs.net
обсуждение исходный текст
Ответ на Scripting a new db server setup  (A E <cooljoint@yahoo.com>)
Список pgsql-general
> Was wondering if there are ways to completely script a new postgresql installation. I need to be able to create the
db,users, and db elements from one command so that I can included it in a setup routine. 

That's rather easy.

A shell script can do roughly the following:

- initdb somewhere
- start PG
- run 'psql template1 < myload.sql'

The myload.sql would connect to template1,  do a "createdb newdbname" and
start creating tables,  etc.

Almost the same concept as doing a restore from a pg_dumpall.

- Brandon

----------------------------------------------------------------------------
 c: 917-697-8665                                            h: 201-435-6226
 b. palmer,  bpalmer@crimelabs.net           pgp:crimelabs.net/bpalmer.pgp5

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

Предыдущее
От: "Keith C. Perry"
Дата:
Сообщение: Re: TPC-C and Postgres
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: Scripting a new db server setup