Re: Dump all in several files

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Dump all in several files
Дата
Msg-id 20050315161539.GB29671@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Dump all in several files  (Frederic Massot <frederic@juliana-multimedia.com>)
Ответы Re: Dump all in several files  (javier wilson <javier.wilson@gmail.com>)
Re: Dump all in several files  (Frederic Massot <frederic@juliana-multimedia.com>)
Список pgsql-general
On Tue, Mar 15, 2005 at 05:01:39PM +0100, Frederic Massot wrote:
> Lonni J Friedman wrote:
> >On Tue, 15 Mar 2005 16:43:01 +0100, Frederic Massot
> ><frederic@juliana-multimedia.com> wrote:
> >
> >>Hi,
> >>
> >>On the PostgreSQL 6.5 server I use this shell script (see below) for the
> >>backup all of the database in several files, one file per database.
> >
> >Maybe i'm just not following you, but why can't you just do:
> >pg_dump $DBNAME >$DB_NAME
> >
> >where $DB_NAME is the name of each database on the box?
> >
>
> This script is called in a crontab the every day at 6 o'clock in the
> morning.

You can obtain the list of databases for scripting with

psql -tlA | cut -d\| -f1

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Si quieres ser creativo, aprende el arte de perder el tiempo"

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

Предыдущее
От: javier wilson
Дата:
Сообщение: Re: Dump all in several files
Следующее
От: Marco Colombo
Дата:
Сообщение: Re: plpython function problem workaround