Postgresql restore dump objects from list

pg_restore command brings an parameter for to define the objects list for restore from a dump.

Use -l for generate objects list from dump:

--list  [or]  -l

Create a file with that list, delete some objects, and use -L for use the new list for restore:

--use-list=list-file  [or]  -L list-file

https://www.postgresql.org/docs/current/static/app-pgrestore.html
http://stackoverflow.com/a/31043192/3662679

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s