Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Better way to restore to existing pg database

$
0
0

We want to restore to an existing 9.3 pg database. What we ended up doing was:

1) delete the database and recreate again, 
2) use pg_restore to restore. 
3) reboot the ubuntu server to allow rails app to pick up the new database. 

We tried the following pg_restore command and it did not restore to an existing database:

$pg_restore --dbname=existing_database --verbose /home/myname/dbbackup.backup

There was no change of existing_database after pg_restore. Is there a command we can restore to an existing pg database without deleting it first as we did? We have to use command line. Many thanks.


Viewing all articles
Browse latest Browse all 1138

Trending Articles