Re: pg_dumpall between Linux and FreeBSD.

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: pg_dumpall between Linux and FreeBSD.
Дата
Msg-id 20020912111228.A25735@svana.org
обсуждение исходный текст
Ответ на pg_dumpall between Linux and FreeBSD.  (Francisco J Reyes <francisco@natserv.net>)
Ответы Re: pg_dumpall between Linux and FreeBSD.
Список pgsql-general
On Wed, Sep 11, 2002 at 03:37:57PM -0400, Francisco J Reyes wrote:
> I have 1 FreeBSD machine and 1 Linux, Red Hat, machine.
> I will need to periodically do a pg_dumpall from the Linux machine to the
> FreeBSD machine.
>
> This has been a problem because on Linux the superuser ID is postgres and
> on FreeBSD it is pgsl.
>
> When I try to restore to the FreeBSD machine it crashes because it can not
> connect to the postgres user ID. I replaced all occurrences of postgres
> with pgsql to get the load to work, but it was very time consuming (2.9 GB
> file).

I'd suggest using sed to do the replace on the fly. They other possibility
is to do a grep -v '\connect'. This will remove all the connect requests
from the input stream. This means that the owner of each object will not be
what it used to be, but with GRANTs set up correctly you won't even notice.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: psql: \pset pager 'always'?
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Mailing lists archive search