RE: Postgresql Duplicate DB

From: Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org, Sathish Kumar <satcse88(at)gmail(dot)com>
Subject: RE: Postgresql Duplicate DB
Date: 2019-02-11 11:16:34
Message-ID: 192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. Not sure if the fastest, but the first that comes up to my mind is using pg_dump and psql. First you create your new database, then you run this(replacing as needed):

pg_dump OLDDB | psql NEWDB

Saludos,

Alvaro Aguayo
Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-1) 3377813 | Cel.: (+51) 995540103 | RPC: (+51) 954183248
Website: www.ocs.pe

Sent from my Sony Xperia™ smartphone

---- Sathish Kumar wrote ----

Hi All,

I would like to duplicate our existing db on the same server, what will be
the faster way to achieve it.

DB size is around 300gb.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2019-02-11 11:16:43 Re: Postgresql Duplicate DB
Previous Message Sathish Kumar 2019-02-11 11:09:44 Postgresql Duplicate DB