T
T
tisprk2020-02-21 17:48:13
PostgreSQL
tisprk, 2020-02-21 17:48:13

How to collect PostgreSQL database recovery log from dmp file?

I restore the database dump with the following command:


pg_restore -U owner -d db_name -v file.dmp

where
owner is the name of the user - the owner of the database
db_name - the name of the database to which the backup is deployed (I create it in advance using create database db_name )
file.dmp - the name of the dump file

As a result of the restoration, I get the message:
WARNING: errors were ignored during restoration: 1

Need to somehow log the restoration backup to track the error.

PS pg_restore -U owner -d db_name -v file.dmp > pg_restore_log.txt

creates a file, but it remains empty. The output goes to the console

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2020-02-21
@tisprk

Add -f restore.log.
pg_restore ... > restore.log 2>&1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question