copy a database withou the data

From: "Marc Fromm" <Marc(dot)Fromm(at)wwu(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: copy a database withou the data
Date: 2008-03-06 18:48:46
Message-ID: 81FEAB8CDDC62B42B6E8AA258228BC8804CDAE33@EVS2.univ.dir.wwu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

We have a database that we use each year.
Each year the database needs to be free of any data from the past year.
We need to retain last years data base with its data.

I tried using template:
CREATE DATABASE 'year2007-2008' TEMPLATE 'year2006-2007';

But the new database contains all the data from the old database.
Is there a way to just get the old database design into a new database?

Thanks

Marc

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message salman 2008-03-06 18:55:23 Re: copy a database withou the data
Previous Message Tom Lane 2008-03-06 18:23:52 Re: Time Zone in Postgres