backup/backup

toc.dat is not being packed in the postgres tarball

tambakoo opened this issue · 3 comments

When I'm trying to restore a postgresql database with a dump file in a .tar format I get a pg_restore: [tar archiver] could not find header for file "toc.dat" in tar archive. Upon inspecting the tar file with tar -tvf db_tarball.tar the list of files does not include the file "toc.dat". I believe that this prevents me from performing a pg_restore.

How to replicate?

  1. gem install backup
  2. generate backup config and model
  3. trigger a backup perfrom
  4. pg_restore -c -U username -d database -v "/path/to/file"
    Run into the "toc.dat" not found error

This is how the database block looks like

    db.username           = ENV["POSTGRESQL_USERNAME"]
    db.password           = ENV["POSTGRESQL_PASSWORD"]
    db.host               = ENV["api_host"]
    db.port               = 5432
    db.additional_options = ["-xc", "-E=utf8"]```

My config file is the out-of-the-box everything commented file. 

* Operating system: MacOS 10.14 Mojave
* Ruby version: 2.5.0
* Tools or services used by backup: PostgreSQL 10.5

sir i am facing the same issue and unable to find appropriate solution so if you know how to resolve plz share with me

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Facing the same issue.