Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 6CC872E2E6C for ; Thu, 6 Mar 2008 14:55:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 02813-03 for ; Thu, 6 Mar 2008 14:55:22 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from livingmail01.inetu.net (unknown [209.235.247.80]) by postgresql.org (Postfix) with ESMTP id F2FE92E0F8F for ; Thu, 6 Mar 2008 14:55:24 -0400 (AST) Received: (qmail 31514 invoked by uid 0); 6 Mar 2008 18:55:23 -0000 Received: from unknown (HELO ?192.168.0.23?) (salmanb@quietcaresystems.com@127.0.0.1) by livingmail01.inetu.net with SMTP; 6 Mar 2008 18:55:23 -0000 Message-ID: <47D03E1B.4090302@quietcaresystems.com> Date: Thu, 06 Mar 2008 13:55:23 -0500 From: salman User-Agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071009) MIME-Version: 1.0 To: Marc Fromm CC: pgsql-admin@postgresql.org Subject: Re: copy a database withou the data References: <81FEAB8CDDC62B42B6E8AA258228BC8804CDAE33@EVS2.univ.dir.wwu.edu> In-Reply-To: <81FEAB8CDDC62B42B6E8AA258228BC8804CDAE33@EVS2.univ.dir.wwu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/54 X-Sequence-Number: 28537 Marc Fromm wrote: > 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 > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-admin > > Sounds like you just want the schema? If so, pg_dump -s will get you it.