How to get some table entries from backup instance back to production instance

From: Marcel Ruff <mr(at)marcelruff(dot)info>
To: pgsql-novice(at)postgresql(dot)org
Subject: How to get some table entries from backup instance back to production instance
Date: 2015-02-10 08:39:25
Message-ID: 54D9C3BD.3060003@marcelruff.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I have 4 tables with 1:n relation:

grandpa -> pa -> child -> grandchild

Now I need to copy an instance of "pa" with his descendants
from my backup (a postgres dump) back to prod.
"grandchild" has a blob column (containing fotos)

Which options do I have?

1) Import the backup dump in a separate postgres instance
2) Do some magic query which created insert statements
3) Run the insert statements on the prod server

What is the best approach, and how does a query look like which
returns nicely formatted insert lines?

Thank you
Marcel

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Florian Schaetz 2015-02-10 08:46:08 Problem: Temporary tables not really temporary tables
Previous Message Lukasz Brodziak 2015-02-09 14:46:30 Re: Pivot table without crosstab