我從我的服務器上獲得了我的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