我已遵循出色的指南here在Mac OS 10.11.6上从9.6.2升级到10.5。当我进入第6步
pg_upgrade -b /usr/local/Cellar/postgresql/9.6.2/bin/ \
-B /usr/local/Cellar/postgresql/10.5/bin/ \
-d /usr/local/Cellar/postgres.old/ \
-D /usr/local/Cellar/postgres.new/
我收到此错误
check for "/usr/local/Cellar/postgresql/9.6.2/bin" failed: No such file or directory
即使mv /usr/local/Cellar/postgresql/9.6.2 /usr/local/Cellar/postgres.old
运行正常。
但是我去
/usr/local/Cellar/postgresql/9.6.2/bin/: No such file or directory
看着
$ du -sh /usr/local/var/*/
148K /usr/local/var/homebrew/
917M /usr/local/var/log/
202G /usr/local/var/postgres96/
37M /usr/local/var/postgresql@9.6/
我认为我的数据仍然存在(postgres96),但不了解如何获取并完成pg_upgrade
。任何帮助表示感谢
编辑;
我认为我需要执行以下操作来撤消我所犯的错误;
撤消移动
mv /usr/local/Cellar/postgres.old /usr/local/Cellar/postgresql/9.6.2
检查运行是否正常
ls /usr/local/Cellar/post*
我应该在9.6.2目录中看到一个bin,然后可以初始化一个新的群集数据目录:
initdb /usr/local/var/postgres.new
然后
pg_upgrade -b /usr/local/Cellar/postgresql/9.6.2/bin/ \
-B /usr/local/Cellar/postgresql/10.5/bin/ \
-d /usr/local/var/postgres96/ \
-D /usr/local/var/postgres.new/
对吗?
鉴于我已经备份了pg_dump