On Wed, Aug 2, 2017 at 7:10 PM, Edmundo Robles <edmundo@xxxxxxxxxxxx> wrote: > > I imagine pg_restore can execute the instructions on dump but don't write on disk. just like David said: "tell me what is going to happen but don't actually do it" IIRC pg_restore does not execute SQL fully. It just passes the commands to the server when in text mode, like psql, and builds some commands and send them to the server to execute when in custom/tar mode. I doubt it has the ability to validate the contents of the dump. >> Edmundo Robles <edmundo@xxxxxxxxxxxx> writes: >> > I mean, to verify the integrity of backup i do: >> > gunzip -c backup_yesterday.gz | pg_restore -d my_database && echo >> > "backup_yesterday is OK" I also think if he is piping the dump must be text mode, I seem to recall custom format needs seekable files, but not too sure about tar, it should not. In this case, as previously suggested, a simple gunzip -t is enough to verify backup file integrity, but checking internal correctness is very difficult ( as it may even depend on server configuration, i.e., needing some predefined users / locales / encodings ). Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general