cd
pg_restore -U twenty -h localhost -p 5432 -C --clean --create --if-exists -d default db_twenty.dump
Password:
pg_restore: error: could not execute query: ERROR: cannot drop the currently open database
Command was: DROP DATABASE IF EXISTS "default";
pg_restore: error: could not execute query: ERROR: database "default" already exists
Command was: CREATE DATABASE "default" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8';
pg_restore: warning: errors ignored on restore: 2
cd
pg_restore -U twenty -h localhost -p 5432 -C --clean --create --if-exists -d default db_twenty.dump
Password:
pg_restore: error: could not execute query: ERROR: cannot drop the currently open database
Command was: DROP DATABASE IF EXISTS "default";
pg_restore: error: could not execute query: ERROR: database "default" already exists
Command was: CREATE DATABASE "default" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8';
pg_restore: warning: errors ignored on restore: 2