如何附加pg_dump备份命令PostgreSQL的日志输出

问题描述 投票:0回答:1

我正在使用以下命令进行追加。

pg_dump -Fc -h hostname -W --dbname=dbanme -f dbname.sql --username 2>demo.log

我想像下面的示例输出一样登录到demo.log。

pg_dump: reading user-defined tables
pg_dump: reading packages variables
pg_dump: reading user-defined packages
pg_dump: reading user-defined synonyms
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: finding typelem dependencies for user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
.
.
.
....```

If we run in mysql using --verbose it will log all stuff using below command.
``` mysqldump -u -p dbname --log-error=error.log --verbose >bkp.sql```
how we can achive in PostgreSQL?

Please help. 

mysql logging postgresql-9.4 pg-dump pg-dumpall
1个回答
0
投票

使用-verbose,如下所述

./ pg_dump -Fc -h主机名-W --dbname = dbanme -f dbname.sql-用户名postgres-详细2> demo.log

公开:我为EnterpriseDB (EDB)工作

© www.soinside.com 2019 - 2024. All rights reserved.