From: | Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com> |
---|---|
To: | "Ray O'Donnell" <ray(at)rodonnell(dot)ie> |
Cc: | sivapostgres(at)yahoo(dot)com, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Copy & Re-copy of DB |
Date: | 2021-01-21 13:49:47 |
Message-ID: | CAD+mzoyifX6+EsacfEF-hgpQSa8jvcHq+VdieCJKOT10ebji9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Pg_dump does what you want but you could also set up replication.
Thanks,
Ben
On Thu, Jan 21, 2021, 8:42 AM Ray O'Donnell <ray(at)rodonnell(dot)ie> wrote:
> On 21/01/2021 13:13, sivapostgres(at)yahoo(dot)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(at)rodonnell(dot)ie
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | sivapostgres@yahoo.com | 2021-01-21 13:52:35 | Re: Copy & Re-copy of DB |
Previous Message | Ray O'Donnell | 2021-01-21 13:41:50 | Re: Copy & Re-copy of DB |