0

I'm going to upgrade postgreSQL from the version 9 to 11. I've exported a database using this command C:\Program Files\PostgreSQL\11\bin\pg_dump.exe --file "C:\\Users\\bnechmi\\DOCUME~1\\db_kd" --host "myhost.com" --port "5450" --username "sce" --no-password --verbose --format=t --blobs --no-tablespaces "kd5"

On the linux server "myhost.com", postgreSQL 9 is installed.

On my new server I have installed postgreSQL 11. I created new database called kd5 then I imported the database using this command pg_restore -h localhost -d kd5 -U postgres ./mypath/db_kd --no-tablespaces --verbose 2>log1126.log

this is the contend of the file log1126.log

pg_restore: creating ACL "kd5.TABLE version"
pg_restore: creating ACL "kd5.TABLE version_bdgeo"
pg_restore: creating ACL "kd5.TABLE version_ihm"
pg_restore: creating ACL "kd5.TABLE version_suroit"
pg_restore: creating ACL "kd5.TABLE zone_tarifaire"
WARNING: errors ignored on restore: 476

Then I have connected to the database kd5, when I run the command \dt I get the message Did not find any relations

How can I import the exported database ?

8
  • Did pg_restore show any message? As which user are you connecting to the new kd5? If you connect as exactly the same user to the old kd5 and type \dt, you get different results? Commented Jun 9, 2022 at 9:10
  • BTW, unless you have a specific reason for using --format=t, it seems to be that --format=c should be better. Commented Jun 9, 2022 at 9:11
  • pg_restore did not show any message. Commented Jun 9, 2022 at 9:12
  • the same with --format=c, "Did not find any relation" and pg_restore did not show any message. Commented Jun 9, 2022 at 9:21
  • @AntonisChristofides I've updated my post, I added the option --verbose 2>log1126.log to pg_restore to get the trace of this commande Commented Jun 9, 2022 at 9:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.