简体   繁体   English

Postgres pg_dump显示空文件

[英]Postgres pg_dump show empty file

我在wamp中使用此命令,但是我得到的是Mybackup.sql空文件,我知道我丢失了什么吗?

<?php    exec("pg_dump -U postgres taro-api > Mybackup.sql"); ?>

With the additional information from the comments, it becomes clear that you are on Windows and pg_dump is not on your PATH . 通过注释中的其他信息,可以清楚地知道您在Windows上,而pg_dump不在PATH

Either use the full absolute path for pg_dump or add the directory to the PATH environment variable. 可以使用pg_dump的完整绝对路径,也可以将目录添加到PATH环境变量中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM