Postgres backup & restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 

 

 


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux