Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to restore data which is there in .backup file from /home/somepath/backupfile.backup to mydb.I tried with following psql dbname < infile but it is not restoring data it gives an error says that 'table_name does not exist'.

share|improve this question
add comment

1 Answer

From the sounds of the manual, the database must already exist and have rights set to it for the restore to work properly. Did you verify that the template for the database created the framework into which to restore your dumped data? That's what the error sounds like...it can't find the correct table to insert the data.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.