| From: | salman <salmanb(at)quietcaresystems(dot)com> | 
|---|---|
| To: | Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu> | 
| Cc: | pgsql-admin(at)postgresql(dot)org | 
| Subject: | Re: copy a database withou the data | 
| Date: | 2008-03-06 18:55:23 | 
| Message-ID: | 47D03E1B.4090302@quietcaresystems.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin | 
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(at)postgresql(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Phillip Smith | 2008-03-06 21:56:23 | Re: | 
| Previous Message | Marc Fromm | 2008-03-06 18:48:46 | copy a database withou the data |