How to restore PostgreSQL database from .tar file?

Posted by Stephen on Server Fault See other posts from Server Fault or by Stephen
Published on 2010-02-21T04:43:38Z Indexed on 2010/04/05 6:03 UTC
Read the original article Hit count: 364

Filed under:
|

I have all PostgreSQL databases backed up during incremental backups using WHM, which creates a $dbName.tar file.

Data is stored in these .tar files, but I do not know how to restore it back into the individual databases via SSH. In particular the file location.

I have been using:

pg_restore -d client03 /backup/cpbackup/daily/client03/psql/client03.tar

which generates the error 'could not open input file: Permission denied'

Any assistance appreciated.

© Server Fault or respective owner

Related posts about postgresql

Related posts about pg-restore