【问题标题】:psql restore goes shows me the shell instead of restoring the data: how to restore with psql?psql restore 向我展示了 shell 而不是恢复数据:如何使用 psql 进行恢复?
【发布时间】:2022-01-21 06:45:13
【问题描述】:

我正在使用 win 10 64 位。

我用pg_dump --column-inserts --data-only --no-owner --no-privileges --dbname=crm_db --schema=public --exclude-table=public.\"cmsArticle\" --host=xxx --username=xxx --port=5432 -v --file=D:\\db_backup\\dump.sql转储我的数据

我有一个 20GB 的文件,现在我尝试使用以下命令恢复:psql -d crm_db --host=xxx.postgres.database.azure.com --username=xxx -p 5432 -v -f D:/db_backup/dump.sql

我看到psql: warning: extra command-line argument D:/db_backup/dump.sql

找到解决方案:

我尝试改成psql -d crm_db --host=xxx.postgres.database.azure.com --username=xxx -p 5432 -v -f D:\\db_backup\\dump.sql

【问题讨论】:

    标签: windows postgresql command-line psql


    【解决方案1】:

    我尝试更改为psql -d crm_db --host=xxx.postgres.database.azure.com --username=xxx -p 5432 -v -f D:\\db_backup\\dump.sql。需要使用\\ 而不是/。 stackoverflow上有一些帖子说需要在windows上使用/,但似乎是错误的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-05
      • 1970-01-01
      • 1970-01-01
      • 2022-01-08
      • 1970-01-01
      • 2020-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多