Suppose a dump is provided from pgdumpall
pg_dumpall > outfile.bkp
How to verify if the outfile is a vaild database file for restoration. Just as a precautionary step before restoring it like
psql -f outfile.bkp postgres
For example: In MySQL we can head first few lines of the backup files produced from mysqldump for having SQL like syntax.