我从我的服务器上获得了我的postgresql db文件夹(/var/lib/postgresql/9.5/main/)的旧副本。现在我想从文件中获取数据。所以我将主文件夹复制到本地机器,并将postgresql配置(/etc/postgresql/9.5/main/postgresql.conf)更改为指向该目录。我还将主目录的权限更改为用户postgres。重新启动postgresql服务(sudo服务postgresql重新启动)后,它实际上不起作用。从文件夹中恢复postgres db
我在做什么错了? (是的,我知道,pg_dump是首选的方式,但以这种方式...) 所以我的问题,这是否甚至工作? 或者还有其他方法可以从中获取数据吗?
一切都在Ubuntu 16.04上完成。
编辑:
改变postgresql.conf文件指向新目录后的日志文件。
2017-10-13 06:15:43 CEST [968-1] LOG: database system was shut down at 2017-10-13 00:21:04 CEST
2017-10-13 06:15:43 CEST [968-2] LOG: MultiXact member wraparound protections are now enabled
2017-10-13 06:15:43 CEST [959-1] LOG: database system is ready to accept connections
2017-10-13 06:15:43 CEST [975-1] LOG: autovacuum launcher started
2017-10-13 06:15:43 CEST [983-1] [unknown]@[unknown] LOG: incomplete startup packet
2017-10-13 06:47:55 CEST [975-2] LOG: autovacuum launcher shutting down
2017-10-13 06:47:55 CEST [959-2] LOG: received smart shutdown request
2017-10-13 06:47:55 CEST [972-1] LOG: shutting down
2017-10-13 06:47:55 CEST [972-2] LOG: database system is shut down
2017-10-13 06:47:55 CEST [4667-1] FATAL: database files are incompatible with server
2017-10-13 06:47:55 CEST [4667-2] DETAIL: The database cluster was initialized without USE_FLOAT8_BYVAL but the server was compiled with USE_FLOAT8_BYVAL.
2017-10-13 06:47:55 CEST [4667-3] HINT: It looks like you need to recompile or initdb.
好的,这指出我this。服务器是armv7l,而本地计算机是x86_64(uname -m)。那么没有机会从中获取数据?
THX,吕克
”真的没有工作“。日志输出?究竟发生了什么或没有?细节!编辑问题至少添加日志输出。 –
@CraigRinger感谢您的建议,更新了我的问题 – Luc