I have archive file with custom format created by pg_dump.

Does it contain the backup creation date?

I can't create backups by myself. I receive the archived files over specific network channel. Backup files have a reception date timestamp, but not the date when it has been created on server.


You can use pg_restore -l <custom_dump_file> and the output should start with something like the following:

; Archive created at 2019-02-13 22:59:59 UTC
;     dbname: <database_name>
;     TOC Entries: 2615
;     Compression: -1
;     Dump Version: 1.13-0
;     Format: CUSTOM
;     Integer: 4 bytes
;     Offset: 8 bytes
;     Dumped from database version: 10.6 (Ubuntu 10.6-1.pgdg16.04+1)
;     Dumped by pg_dump version: 11.1 (Ubuntu 11.1-3.pgdg16.04+1)

As you see, the "Archived created at" line is probably what you're looking for.

|improve this answer|||||

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.