pg_restore: Its not restoring my db

What does it mean I'm trying to restore my postgresql db and here is what I'm getting but I do not see it restore tables/data/

C:\Program Files\PostgreSQL\9.4\bin\pg_restore.exe --host 123-97.compute-1.amazonaws.com --port 5432 --username "username" --dbname "mydb" --no-password --section pre-data --section data --section post-data --schema public --verbose "C:\db\employee.backup"

pg_restore: connecting to database for restore pg_restore: implied data-only restore

Process returned exit code 0.

I'm using Windows 8.1

4

3 Answers

I was getting this error while restoring schema backup with different name. When i restored the schema with same name it worked like a charm and then later I renamed it.

Alternative: do pg_restore from a carefully-restricted pg_dump dump and avoid --schema (and possibly even --table) options when using pg_restore.

i faced same issue when tried to restore psql 12 backup into psql 12 database but with newer ubuntu version (backup was on ubuntu 18 and restore on ubuntu 20 ,both are psql 12). when i downgraded ubuntu from 20 to 18 it restored just normally, not sure why ubuntu version should make problem. my advice just make sure environment of backup and restore are exactly the same.

For backup purposes, rename your old schema eg. schema_old and create a new schema with the same name, and try to restore it again.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like