pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
To: pgsql-general@lists.postgresql.org
To: Sathish Kumar <satcse88@gmail.com>
Subject: RE: Postgresql Duplicate DB
Date: Mon, 11 Feb 2019 06:16:34 -0500 (PET)
Message-ID: <192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com> (raw)
In-Reply-To: <CANa_DOjLgEZ-ZFfMC+qTNUZf0CEsRS8UCEksFKCAagwqQuepsA@mail.gmail.com>
References: <CANa_DOjLgEZ-ZFfMC+qTNUZf0CEsRS8UCEksFKCAagwqQuepsA@mail.gmail.com>

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.


view thread (3+ messages)  latest in thread

Message-ID: <192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com>
Permalink:  ../192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com/
Also on:    postgresql.org/message-id/192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: aaguayo@opensysperu.com, satcse88@gmail.com
  Subject: Re: Postgresql Duplicate DB
  In-Reply-To: <192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com>
  References: <CANa_DOjLgEZ-ZFfMC+qTNUZf0CEsRS8UCEksFKCAagwqQuepsA@mail.gmail.com> <192364216.3505.1549883794593.JavaMail.zimbra@adriana.opensysperu.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox