我如何备份postgres数据库? [英] How do i back up postgres database?
问题描述
我正在使用postgresql数据库进行web应用。我想备份我的应用程序数据库怎么办?
谢谢
< br $> b $ b
我尝试了什么:
我在postgresql工具中尝试过备份但是我得到这样的错误
--format custom --blobs --encoding UTF8 --verbose --fileF:\PostgreSql_Backups\Public.backupnew1\SNCF \
pg_dump:[archiver(db)]连接到数据库SNCF失败:致命:数据库SNCF不存在
pg_dump:***中止因为错误
流程返回退出代码1.
i am using postgresql database for web application.i want to backup my application database how can i do?
thank you
What I have tried:
I tried backup in postgresql tools but iam getting error like this
--format custom --blobs --encoding UTF8 --verbose --file "F:\PostgreSql_Backups\Public.backupnew1" \"SNCF\"
pg_dump: [archiver (db)] connection to database ""SNCF"" failed: FATAL: database ""SNCF"" does not exist
pg_dump: *** aborted because of error
Process returned exit code 1.
推荐答案
我建议阅读 Richard MacCutchan [ ^ ]对问题的评论和文档 [ ^ ]。
I'd suggest to read Richard MacCutchan[^] comment to the question and the documentation[^].
如果您在运行 pg_dump
时遇到问题,请确保您能够使用例如psql [ ^ ]。此外,libpq前端库使用的任何默认连接设置和环境变量都将适用。
If you have problems running pg_dump
, make sure you are able to select information from the database using, for example, psql[^]. Also, any default connection settings and environment variables used by the libpq front-end library will apply.
注意,正确的命令是: pg_dump [connection-option ...] [option ...] [dbname]
这篇关于我如何备份postgres数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!