Re: How to exclude blobs (large objects) from being loaded by pg_restore?

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to exclude blobs (large objects) from being loaded by pg_restore?
Date: 2015-05-02 14:24:59
Message-ID: 20150502142459.GA4086@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> wrote:

> On Fri, 1 May 2015 14:12:08 +0000
> Alanoly Andrews <alanolya(at)invera(dot)com> wrote:
>
> > Hello,
> >
> > We have a database that has been unloaded using pg_dump. This database has a table with a field defined as "lo". When restoring this database to another system, we want to avoid loading this particular table as it is very large (about 8GB of blob data) and is not needed on the target system. I tried the following:
> > 1. Create a list of all the tables in the pg_dump file using the -l option of pg_restore
> > 2. Edit out the lines corresponding to the said table (with the "lo" column)
> > 3. Run the pg_restore with the -L option to use the edited list of tables.
> >
>
> use the -T option of pg_dump?

i think, this isn't a solution.

i HAVE a complete dump, but now i need a restore without the lo - data.
And - you can't create a new dump with -T for several reasons now.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Alanoly Andrews 2015-05-02 14:27:37 Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?
Previous Message Vincent Veyron 2015-05-02 13:39:01 Re: How to exclude blobs (large objects) from being loaded by pg_restore?

Browse pgsql-general by date

  From Date Subject
Next Message Alanoly Andrews 2015-05-02 14:27:37 Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?
Previous Message Vincent Veyron 2015-05-02 13:39:01 Re: How to exclude blobs (large objects) from being loaded by pg_restore?