[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to clone a dataset?
- Subject: Re: how to clone a dataset?
- From: "Chris Travers" <..hidden..>
- Date: Sun, 28 Sep 2008 21:42:40 -0700
On Sun, Sep 28, 2008 at 9:34 PM, david <..hidden..> wrote:
> david wrote:
>> I want to create a clone of a dataset except with a different dataset name and
>> different users. Both versions need to be "live" simultaneously.
>>
>
>
> answering my own question:
>
> from psql superuser:
>
> postgres=# create database "new_db" template="old_db" owner="old_db_owner";
That also works, but there is one limitation to be aware of:
The command I send clones the db as it was when the command is first
started. The command you have listed is much faster but essentially
does a file-level copy. This means that your database will be
inaccessible while it is being cloned in your command.
Both are options depending on what you need. They are not quite the
same thing though.
Best Wishes,
Chris Travers