Dump all in several files

Поиск
Список
Период
Сортировка
От Frederic Massot
Тема Dump all in several files
Дата
Msg-id d16vq6$csi$1@floppy.pyrenet.fr
обсуждение исходный текст
Ответы Re: Dump all in several files  (Lonni J Friedman <netllama@gmail.com>)
Список pgsql-general
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.

With version 7.3 of PostgreSQL (and the following) the data are not
recorded any more in a repertory with the name of the database, but with
the OID of the basebase.

Do you know how I can adapt this script?

If a developer of pg_dumpall reads this post, is it possible to add to
the command pg_dumpall an option to record one database per file?

Regards.


#! /bin/bash
#
for p in $(find /var/lib/postgres/data/base/ -type d -print -mindepth 1
-maxdepth 1 )
do
   base=`basename "$p"`
   pg_dump -d -f /var/backup/postgresql/dump_$base $base
done

--
==============================================
|              FREDERIC MASSOT               |
|     http://www.juliana-multimedia.com      |
|   mailto:frederic@juliana-multimedia.com   |
===========================Debian=GNU/Linux===

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

Предыдущее
От: Ragnar Hafstað
Дата:
Сообщение: Re: plpython function problem workaround
Следующее
От: Lonni J Friedman
Дата:
Сообщение: Re: Dump all in several files