From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | matt(at)byrney(dot)com, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Clone database using rsync? |
Date: | 2013-11-06 00:01:51 |
Message-ID: | 527986EF.9030103@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/05/2013 03:41 PM, matt(at)byrney(dot)com wrote:
> Copying the data folder should work as long as you stop the postgres
> service on the production server before starting the copy and don't start
> it up again until the copy finishes. pg_dump and pg_restore (look them up
> in the online docs) will get the job done without you having to take the
> production server offline.
>
> If you go with the folder copy and your installation has postgresql.conf,
> pg_hba.conf and so on in your data folder, you'll probably want to edit
> them after the copy - more logging, different security etc.
OP did not say what version they where on but pg_basebackup could be an
option, no shutdown necessary either:
http://www.postgresql.org/docs/9.3/interactive/app-pgbasebackup.html
>
> Matt
>
>
>> I need to clone production database to development server ? What is the
>> best
>> and simplest way to achieve that? Both my production and development
>> postgres versions are same. Will copy over data folder using rsync work?
>>
>> Thanks in advance.
>>
>>
>>
>> --
>> View this message in context:
>> http://postgresql.1045698.n5.nabble.com/Clone-database-using-rsync-tp5777141.html
>> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>>
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2013-11-06 00:15:44 | Re: pg_start_backup('label',true) why do I need 2nd parameter? |
Previous Message | sparikh | 2013-11-05 23:49:42 | Re: Clone database using rsync? |