Postgres backup & restore - Mailing list pgsql-performance

From Daulat Ram
Subject Postgres backup & restore
Date
Msg-id BL0PR01MB5187FF87AD89EC1CC7D673449B240@BL0PR01MB5187.prod.exchangelabs.com
Whole thread Raw
Responses Re: Postgres backup & restore
List pgsql-performance

Hello team,

 

We have a postgres11.2 on docker and we are migrating a kb_rep database from postgres 9.6 to postgres 11.2 via pg_dump/pg_restore

We have created a kb_rep schema in postgres 11.2 also but during pg_restore there is an error “pg_restore: [archiver (db)] connection to database "kb_rep" failed: FATAL:  database "kb_rep" does not exist”

 

See below:

 

psql (11.2 (Ubuntu 11.2-1.pgdg18.04+1))

Type "help" for help.

 

postgres=# \l

                              List of databases

   Name    |  Owner   | Encoding | Collate |  Ctype  |   Access privileges

-----------+----------+----------+---------+---------+-----------------------

kb_rep    | postgres | UTF8     | C.UTF-8 | C.UTF-8 |

kbdb      | postgres | UTF8     | C.UTF-8 | C.UTF-8 |

postgres  | postgres | UTF8     | C.UTF-8 | C.UTF-8 |

template0 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +

           |          |          |         |         | postgres=CTc/postgres

template1 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +

           |          |          |         |         | postgres=CTc/postgres

(5 rows)

 

postgres=#

 

 

postgres@b06a42b503e9:/$ pg_restore -h 10.29.50.21 -p 5432 -d kb_rep -v /var/lib/kb_rep_backup16

pg_restore: connecting to database for restore

Password:

pg_restore: [archiver (db)] connection to database "kb_rep" failed: FATAL:  database "kb_rep" does not exist

postgres@b06a42b503e9:/$

 

Please help on this issue.

 

Regards,

Daulat

 

 

 

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Out of Memory errors are frustrating as heck!
Next
From: Justin Pryzby
Date:
Subject: Re: Postgres backup & restore