Search Postgresql Archives

Re: Copying a database.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 20, 2014, at 11:09 AM, maillists0@xxxxxxxxx wrote:

> I send a nightly dump of my production database to a development server. A script drops the existing development database and replaces it with the current production copy. 
> 
> Each dev uses her own copy of the database. Is there a way to copy the current development database to a differently named db on the same machine, including the data,  without using the sql dump? 

Look at CREATE DATABASE developer_db WITH TEMPLATE production_copy;

createdb with the --template option is a convenient way to do that from the commandline.

Cheers,
  Steve




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux