Re: [GENERAL] Re: Restoring tables with circular references dumped toseparate files
От | Melvin Davidson |
---|---|
Тема | Re: [GENERAL] Re: Restoring tables with circular references dumped toseparate files |
Дата | |
Msg-id | CANu8FiznwXTCL8BKyMg-cKioFenthiF040ceX=z=h3w-ca8iOA@mail.gmail.com обсуждение исходный текст |
Ответ на | [GENERAL] Re: Restoring tables with circular references dumped to separatefiles (doganmeh <mehmet@edgle.com>) |
Ответы |
[GENERAL] Re: Restoring tables with circular references dumped to separatefiles
|
Список | pgsql-general |
On Sat, Oct 21, 2017 at 8:24 AM, doganmeh <mehmet@edgle.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@postgresql.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
--
Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

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