Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011

    Red face Unanswered: by mistake delete query executed and lost the data want to restore

    Hi all,

    by mistake i executed delete query on live server(production server).
    on live server a backup of the database is taken through the script to
    run and update the backup on stand by database server.

    I know if a get the .backup file i can resolve the issue to some extent.

    I got the file too..but it is only a single backup file.Now the problem is how
    can i restore a backup having multiple database on my pc where postsgres is
    Do i need to make a blank database having the same name as on production server ?

    if yes then what will be the next step to restore it

    Thanks in advance to take me out of this...

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    The backup file is text, correct?
    search the file for the 'INSERT INTO yourtablename' statements, & copy/paste these lines into a new SQL file. Then, run the new SQL file with pgAdmin or PSQL
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts