db contianer is not started after moving data folder

可紊 提交于 2020-04-18 05:46:47

问题


So we had a problem with our Hard disk which contained the data folder for postgres after fixing the problem moved data folder into a new hard disk and change the docker_compose.yml we have following contents in the docker compose file

db:
  image: postgres:9.4
  volumes:
    - /mnt/hdd4/postgresql/data:/var/lib/postgresql/data
    - ./tmp:/tmp/docker
  ports:
    - "5432"

now when I we try to start the db container I'm getting following error

db_1                | 
db_1                | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1                | 
db_1                | LOG:  database system was interrupted; last known up at 2020-04-07 18:03:04 UTC
db_1                | LOG:  invalid primary checkpoint record
db_1                | LOG:  invalid secondary checkpoint record
db_1                | PANIC:  could not locate a valid checkpoint record
db_1                | LOG:  startup process (PID 28) was terminated by signal 6: Aborted
db_1                | LOG:  aborting startup due to startup process failure
app_db_1 exited with code 1

can someone help? please let me know if you need more information we really need the data its about 243 GB in size and very important.

来源:https://stackoverflow.com/questions/61267219/db-contianer-is-not-started-after-moving-data-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!