From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | doganmeh <mehmet(at)edgle(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Re: Restoring tables with circular references dumped to separate files |
Date: | 2017-10-21 15:06:43 |
Message-ID: | CANu8FiznwXTCL8BKyMg-cKioFenthiF040ceX=z=h3w-ca8iOA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Oct 21, 2017 at 8:24 AM, doganmeh <mehmet(at)edgle(dot)com> wrote:
> Seems that would be easier and less error prone. Thanks,
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-
> f1843780.html
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>I was dumping each table to a separate file so I could pick and choose
when restoring...
*It seems to me that instead on multiple single table dumps, you could take
advantage of restoring from a list-file.*
*Just *
*1. do a dump with custom format ( -F c)*
*EG: pg_dump -U postgres -F c -t table1 -t table2 -t table3 yourdb >
yourdb.dmp*
*2. use pg_restore -l to create a list-file*
*EG: pg_restore -l yourdb.dmp > yourdb.lis*
*3. edit yourdb.lis and comment out ( prefix with ; ) any line you don't
want*
*4. then use pg_restore with the edited list-file *
*EG: pg_restore -L yourdb.lis yourdb.dmp*
*See examples at the end of*
*https://www.postgresql.org/docs/9.6/static/app-pgrestore.html
<https://www.postgresql.org/docs/9.6/static/app-pgrestore.html>*
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
From | Date | Subject | |
---|---|---|---|
Next Message | israel | 2017-10-21 15:36:17 | Re: Weird performance difference |
Previous Message | doganmeh | 2017-10-21 12:24:42 | Re: Restoring tables with circular references dumped to separate files |