我正在try 备份postgresql的数据库,我想使用pg_dump命令

psql -U postgres
postgres-# pg_dump test > backup.sql

但我不知道输出文件在哪里

推荐答案

转到命令提示符和目录postgresql\9.3\bin.

Example

.

..
    c:\Program files\postgresql\9.3\bin> pg_dump -h localhost -p 5432 -U postgres test > D:\backup.sql
...

After above command enter User "postgres" password and check D:\ drive for backup.sql file

Database相关问答推荐

如何调试Anylogic SQL数据库TLS错误?

如何使用PostgreSQL列出特定数据库的表并按大小排序?

网络分区恢复后副本的更新数据发生了什么

mysql数据库自动分区

Spring DriverManagerDataSource vs apache BasicDataSource

预测下一个自动插入的行 ID (SQLite)

SQLServer:如何对按外键依赖性排序的表名进行排序

Java中基于文件的数据库

如何允许多个用户同时连接到我的 H2 数据库?

Postgres - 如何返回缺失数据计数为 0 的行?

库存数据库的最佳 struct

错误:mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication

避免从网站数据库中data scraping数据抓取?

主键和主属性有什么区别?

如何产生幻读?

在 SQLite 数据库中加入 3 个表

PHP 可以与 MS SQL 数据库一起使用吗

日期格式的 Oracle SQL 查询

归一化 - 2NF 与 3NF

数据库事务是否防止竞争条件?