I'm trying to automate the backup of the database. I created a backup with the following command:
pg_dump --format=c --no-owner --username=postgres <dbname> > backup.dump
This seems to work as advertised. A dump is created.
To test this backup, I dropped the database from the database manager webpage. Then in commandline I use:
createdb -T template0 <name>
pg_restore --no-owner --dbname=<name> backup.dump
A database is created and the restore happened. But when I go to the database manager webpage, no database is found.
If I try restoring with the restore webpage, I get an error saying "Could not restore the database"
Any ideas on how to fix this?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/22/14, 4:50 AM|
|Seen: 3999 times|
|Last updated: 3/16/15, 8:10 AM|