0

I am using Postgresql 9.5.10 for developing vehicle tracking application and taking daily backups as pg_dump Custom format. But while restoring the same it shows.

$ pg_restore -h localhost -d dbname -U user  -a tracking_data.sql
pg_restore: [compress_io] could not uncompress data: (null)
1
  • That error sounds to me like the end of file is reached while it is expecting more data. Commented Jan 1, 2019 at 7:17

1 Answer 1

1

Use psql to restore plain SQL (like in your example) script file generated by pg_dump and pg_dumpall tools.

psql -U username --set ON_ERROR_STOP=on -f backupfile.sql 

The command above is restoring a database and stops if error occurs.

pg_restore is used to restore tar file and directory format created by the pg_dump tool.

Sign up to request clarification or add additional context in comments.

Comments

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.