Codeship restore PostgreSQL database? -


i have small subset of our db dump integration testing. restore using command:

pg_restore --no-acl --no-owner --verbose --create -h localhost -p 5435 -j 4 -u $pg_user -d test latest.dump 

the problem in logs see:

pg_restore: connecting database restore pg_restore: processing item 5308 encoding encoding pg_restore: processing item 5309 stdstrings stdstrings pg_restore: processing item 5310 database dlq8aimf0q2pf pg_restore: creating database dlq8aimf0q2pf pg_restore: connecting new database "dlq8aimf0q2pf" pg_restore: connecting database "dlq8aimf0q2pf" user "postgres" 

as see tries create "dlq8aimf0q2pf" not "test" specified. able database name? env var using name?

as said in pg_restore doc --create option :

when option used, database named -d used issue initial drop database , create database commands. all data restored database name appears in archive.

if have existing database test , want restore it, don't use --create.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -