If the pg_dumpall command exit status is zero, the created file is OK.
There is no way to know exact timestamp of backup creation when you use pg_dumpall, because it creates output as a plain text file.
But dumps made with custom format (pg_dump -F c) have some extra metadata.
So here's a basic script I usually recommend to make backup of PostgreSQL cluster:
#!/bin/sh
pg_dumpall -g > pg-globals.sql # for global stuff like usernames/passwords
for db in db1 db2 db3; do
pg_dump -F c $db > pg-$db.backup # separate file for every database in the cluster
done
This way you have separate file for each database. Each of them can be inspected with pg_restore to see actual date and time of creation as well as other info:
filip@srv:~$ pg_restore -l pg-inspire.backup |head -n 15
;
; Archive created at Thu Dec 1 07:28:27 2011
; dbname: inspire
; TOC Entries: 714
; Compression: -1
; Dump Version: 1.12-0
; Format: CUSTOM
; Integer: 4 bytes
; Offset: 8 bytes
; Dumped from database version: 9.0.5
; Dumped by pg_dump version: 9.0.5
;
;
; Selected TOC Entries:
;
I highly recommend reading these: