Re: copy a database withou the data

Поиск
Список
Период
Сортировка
От salman
Тема Re: copy a database withou the data
Дата
Msg-id 47D03E1B.4090302@quietcaresystems.com
обсуждение исходный текст
Ответ на copy a database withou the data  ("Marc Fromm" <Marc.Fromm@wwu.edu>)
Список 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@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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Marc Fromm"
Дата:
Сообщение: copy a database withou the data
Следующее
От: "Phillip Smith"
Дата:
Сообщение: Re: