Discussion:
[ADMIN] Restoring selected records from backup file
(too old to reply)
Piyush Lenka
2012-03-02 10:19:30 UTC
Permalink
hi,

1. How can we restore selected records from a plain text backup
(backup.sql).
2. Is it possible using psql. If yes how
Please Help

Thanks & Regards
Piyush
davidh
2012-03-03 14:17:02 UTC
Permalink
The only way I know of doing this is to restore the backup to a separate database or table and doing a "SELECT INTO" statement. The only caveat is that you need to make sure you delete the outdated records from the prod table. To do this you may have to temporarily disable foreign key enforcing.

David.
hi,
1. How can we restore selected records from a plain text backup (backup.sql).
2. Is it possible using psql. If yes how
Please Help
Thanks & Regards
Piyush
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...