Database Administrators Asked on December 24, 2021
I need to run pg_restore on my PC with Windows CMD to restore a dump to a remote DB. I need to save the running report of the pg_restore into a file, to make sure the restoration ran as expected. Below is the pg_restore command I ran.
pg_restore.exe --host=10.10.10.2 --port=5432 --username=postgres
--dbname=mytargetdb --verbose --single-transaction "AT5.DUMP"
It turned out that:
> report.txt
in the end of the pg_restore command does not render error, but nothing got written to the textfile.--file=report.txt
throws "error: options -d/–dbname and -f/–file cannot be used together"The restoration was actually successful. But copy-paste from the cmd windows is not an option as the resulting report was long enough so the cmd only shows some hundreds of the last line of the report, and not the most from earlier lines.
So how should I do that?
My environment:
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP