Re: Copy & Re-copy of DB - Mailing list pgsql-general

From Ray O'Donnell
Subject Re: Copy & Re-copy of DB
Date
Msg-id 00b51766-0fb1-6c6c-82c1-e08cf122e798@rodonnell.ie
Whole thread Raw
In response to Re: Copy & Re-copy of DB  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
Responses Re: Copy & Re-copy of DB
Re: Copy & Re-copy of DB
List pgsql-general
On 21/01/2021 13:13, sivapostgres@yahoo.com wrote:
> Hello,
> 
> I'm from SQL Server now developing my current project using PG.
> 
> In our earlier project(s), we used to copy the database from one server 
> to another, work in another server, and re-copy it in the original 
> server.   All happened easily with just transferring the two files (mdf 
> & ldf) to our required server.
> 
> Want to replicate the same in PG.  Is there any way to accomplish the 
> same in PG ?

create database <new-db-name> template <old-db-name>

Would that do the job? You could also use pg_dump.

Ray.


-- 
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie



pgsql-general by date:

Previous
From: Ravi Krishna
Date:
Subject: Re: Copy & Re-copy of DB
Next
From: Benedict Holland
Date:
Subject: Re: Copy & Re-copy of DB