pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: salman <salmanb@quietcaresystems.com>
To: Marc Fromm <Marc.Fromm@wwu.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: copy a database withou the data
Date: Thu, 06 Mar 2008 13:55:23 -0500
Message-ID: <47D03E1B.4090302@quietcaresystems.com> (raw)
In-Reply-To: <81FEAB8CDDC62B42B6E8AA258228BC8804CDAE33@EVS2.univ.dir.wwu.edu>
References: <81FEAB8CDDC62B42B6E8AA258228BC8804CDAE33@EVS2.univ.dir.wwu.edu>


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.



view thread (2+ messages)

Message-ID: <47D03E1B.4090302@quietcaresystems.com>
Permalink:  ../47D03E1B.4090302@quietcaresystems.com/
Also on:    postgresql.org/message-id/47D03E1B.4090302@quietcaresystems.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: salmanb@quietcaresystems.com, Marc.Fromm@wwu.edu
  Subject: Re: copy a database withou the data
  In-Reply-To: <47D03E1B.4090302@quietcaresystems.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox