Re: PG_RESTORE/DUMP Question
| От | Doug McNaught |
|---|---|
| Тема | Re: PG_RESTORE/DUMP Question |
| Дата | |
| Msg-id | m33cdcp2gk.fsf@varsoon.wireboard.com обсуждение исходный текст |
| Ответ на | PG_RESTORE/DUMP Question (Alex <alex@meerkatsoft.com>) |
| Список | pgsql-general |
Alex <alex@meerkatsoft.com> writes: > Hi, > > I have a test system that is setup the same as a production system and > would like to frequently copy the database over. > pg_dump takes a few hours and even sometimes hangs. > > Are there any reasons not to simply just copy the entire data > directory over to the test system? I could not find any postings on > the net suggesting otherwise. Is there anything to pay attention too ? If the two systems are the same architecture and OS, this can work, but in order to get a consistent copy, you need to either: a) Stop (completely shut down) the source database while the copy runs, or b) Use volume management and take a snapshot of the source database, them copy the snapshot over. This will lose open transactions but will be otherwise consistent. -Doug
В списке pgsql-general по дате отправления: