Copying database directory

Поиск
Список
Период
Сортировка
От Tsing, Vadim
Тема Copying database directory
Дата
Msg-id 035B18EFA3CCA540AF17AD5D3DFD9847E097F0@LISL-XBCK-C1-V2.snaponglobal.com
обсуждение исходный текст
Список pgsql-admin

We are trying to select a database engine for a new product we plan to start developing. One of the requirements is to be able to ship the data on the media and install it on the user’s hard-drive.

One of the issues we’ve run into is that pg_restore takes a lot of time to restore large database.

Also, moving entire data directory is not an option since we will have multiple databases that user can choose to install.

We’ve tried to copy the database directory and it seems to work. Unfortunately we are not sure if there is any, not visible, damage to the data.

So, here is my question: Is it possible to:

1.       Create a database

2.       Stop postgres

3.       Empty out the directory created by the new database

4.       Copy files from another database (created on a different server) into that directory

5.       Start postgres and use the database

 

Once this is completed we may need to repeat the process for another database.

 

Is this possible? If not, what are other options?

 

Any help or suggestions is greatly appreciated.

 

Thank you.

 

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

Предыдущее
От: "Anibal David Acosta"
Дата:
Сообщение: using limit
Следующее
От: "Anibal David Acosta"
Дата:
Сообщение: Re: using limit