Re: pg_dumpall between Linux and FreeBSD. - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: pg_dumpall between Linux and FreeBSD.
Date
Msg-id 20020912111228.A25735@svana.org
Whole thread Raw
In response to pg_dumpall between Linux and FreeBSD.  (Francisco J Reyes <francisco@natserv.net>)
Responses Re: pg_dumpall between Linux and FreeBSD.  (Francisco J Reyes <francisco@natserv.net>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql: \pset pager 'always'?
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Mailing lists archive search