【发布时间】:2019-12-05 07:21:02
【问题描述】:
在我即将死去的 Ubuntu 18.04 系统上,我能够检索到 crewdb_bak.tar file(PostgreSQL 备份文件)并将其保存到 USB。该文件是使用以下命令创建的:
pg_dump -U postgres -h localhost -W -F t crowddb > /home/chris1/Documents/crewcut/crewdb/crewdb_bak.tar
在安装 PostgreSQL 后的新 Ubuntu 系统上,我在终端中运行以下命令来恢复数据库:
psql -U postgres -d crowddb /chh1/1818-305D/crewdb_bak.tar
不幸的是,我得到以下输出:
psql: FATAL: Peer authentication failed for user "postgres"
pg_dump -U postgres -h localhost -W -F t crowddb > /home/chris1/Documents/crewcut/crewdb/crewdb_bak.tar
psql -U postgres -d crowddb /chh1/1818-305D/crewdb_bak.tar
【问题讨论】:
标签: postgresql pg-dump