【问题标题】:How to append log output of pg_dump backup command PostgreSQL如何附加 pg_dump 备份命令 PostgreSQL 的日志输出
【发布时间】:2020-02-06 07:50:38
【问题描述】:

我正在使用下面的命令来追加。

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】:

    使用 --verbose 如下所述

    ./pg_dump -Fc -h 主机名 -W --dbname=dbanme -f dbname.sql --username postgres --verbose 2>demo.log

    披露:我为EnterpriseDB (EDB)工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-18
      • 1970-01-01
      • 2015-06-29
      • 2012-02-09
      • 2014-12-05
      • 2019-07-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多