1

I was given a compressed folder that contains number of subdirectories, and, among others, directories named .pgdir with number of numerically sequenced files in a <9999>.dat.gz format and one in a toc.dat format.

I cannot post the content of the files, but when I uncompress the <9999>.dat.gz, they each contain pretty structured, tab-separated tabular data with \N [sic] at the end line.
toc.dat has a mix of binary and strings, starting with PGDMP where I can recognize some postgres DDL statements, schema creation. etc.

To me, this looks like a postgres backup, but I am not familiar with this layout and how to restore it.

Is anyone familiar with these structures, and how could they be used to restore the database?

2

Use pg_restore to list its contents, dump it to SQL, or restore it to a database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.