Re: pg_dumpall between Linux and FreeBSD.

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Francisco J Reyes <francisco(at)natserv(dot)net>
Cc: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dumpall between Linux and FreeBSD.
Date: 2002-09-12 01:12:28
Message-ID: 20020912111228.A25735@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2002-09-12 01:12:54 Re: Mailing lists archive search
Previous Message Bruce Momjian 2002-09-12 00:59:39 Re: psql: \pset pager 'always'?