Обсуждение: Restoring selected records from backup file

Поиск
Список
Период
Сортировка

Restoring selected records from backup file

От
Piyush Lenka
Дата:
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

Re: Restoring selected records from backup file

От
davidh
Дата:
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
youmay have to temporarily disable foreign key enforcing.  

David.

On Mar 2, 2012, at 5:19 AM, Piyush Lenka <lenka.piyush@gmail.com> wrote:

> 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