Creating new cluster by copying directory?

From: Wells Oliver <wellsoliver(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Creating new cluster by copying directory?
Date: 2013-07-11 20:31:05
Message-ID: CAOC+FBWPBS1_nH4mTcC9qr_c6Rr410d=LR6L9LRLnDDS=zz68A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

All: it would take ~4 hours to pg_restore a backup. I want to quickly
create a duplicate cluster (for testing). My idea:

1. pg_ctlcreatecluster 9.1 test
2. rm /var/lib/postgresql/9.1/test/*
2. cp /var/lib/postgresql/9.1/main /var/lib/postgresql/9.1/test
3. pg_ctlcluster 9.1 test start

Is this viable? If not, is there another way to create a duplicate cluster
in a timely fashion?

--
Wells Oliver
wellsoliver(at)gmail(dot)com

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Gilberto Castillo 2013-07-11 20:41:51 Re: Creating new cluster by copying directory?
Previous Message Devrim GÜNDÜZ 2013-07-11 18:34:53 Re: Building an extension for a different version of Postgres